Do something after checkbox is changed JQuery - Javascript jQuery

Javascript examples for jQuery:Form Checkbox

Description

Do something after checkbox is changed JQuery

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-3.1.1.min.js"></script> 
      <script type="text/javascript">
    window.onload=function(){// w ww  .j  a  v a  2  s  . co m
$('input:checkbox[name=example]').change(function() {
   console.log("Hello!");
});
    }

      </script> 
   </head> 
   <body> 
      <input type="checkbox" name="example">
       click me  
   </body>
</html>

Related Tutorials