Javascript examples for jQuery:Form Checkbox
Do something after checkbox is changed JQuery
<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>