Access to Javascript Function from on() - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:on

Description

Access to Javascript Function from on()

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.0.js"></script> 
      <script type="text/javascript">
$(function() {//w w  w . j a  v a  2  s. c om
    $('#selectBox').on('change',function(){console.log('test')})
});

      </script> 
   </head> 
   <body> 
      <select id="selectBox"> 
         <option>a</option> 
         <option>b</option> 
      </select>  
   </body>
</html>

Related Tutorials