Catch click on input type "checkbox" - Javascript jQuery

Javascript examples for jQuery:Form Checkbox

Description

Catch click on input type "checkbox"

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-1.8.3.js"></script> 
      <script type="text/javascript">
    $(function(){/*from  ww  w.j  av  a2s  .c  om*/
$('input:checkbox').on('click', function(){
      console.log("checkbox clicked");
});
    });

      </script> 
   </head> 
   <body> 
      <input type="checkbox">  
   </body>
</html>

Related Tutorials