Javascript examples for DOM HTML Element:Input Checkbox
Input Checkbox disabled Property - Disable and enable a checkbox:
<!DOCTYPE html> <html> <body> Checkbox: <input type="checkbox" id="myCheck"> <button onclick="disable()">Disable checkbox</button> <button onclick="undisable()">Enable checkbox</button> <script> function disable() {//w ww.ja va2 s .c o m document.getElementById("myCheck").disabled = true; } function undisable() { document.getElementById("myCheck").disabled = false; } </script> </body> </html>