Javascript examples for jQuery:Form Checkbox
If an input check box is checked
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(window).load(function(){/*from ww w . j a v a 2 s . co m*/ $(':checkbox').change(function () { if ($(this).is(':checked')) { console.log("test"); } }); }); </script> </head> <body> <input type="checkbox"> </body> </html>