Javascript examples for DOM HTML Element:Input Checkbox
Disable the action of check-uncheck a checkbox
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// w ww .j a v a 2 s. co m document.querySelector("#check").addEventListener("click", function(e) { e.preventDefault(); }); } </script> </head> <body> <input type="checkbox" id="check"> </body> </html>