Javascript examples for DOM HTML Element:Form Event
Get to know if a check box input is checked
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/*from www . j av a 2 s .c om*/ document.getElementById('yousendit').onclick = function() { if (this.checked==true) console.log('checked'); } }); </script> </head> <body> <input type="checkbox" name="yousendit" id="yousendit" value="1"> </body> </html>