Disable and enable a reset button:
<!DOCTYPE html> <html> <body> <input type="reset" id="myReset"><br> <button onclick="disable()">Disable Reset Button</button> <button onclick="enable()">enable Reset Button</button> <script> function disable() {//from w w w .j av a 2s .c o m document.getElementById("myReset").disabled = true; } function enable() { document.getElementById("myReset").disabled = false; } </script> </body> </html>