Input Reset disabled Property - Disable and enable a reset button: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Reset

Description

Input Reset disabled Property - Disable and enable a reset button:

Demo Code

ResultView the demo in separate window

<!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  ww. ja v  a  2s.  com*/
    document.getElementById("myReset").disabled = true;
}
function enable() {
    document.getElementById("myReset").disabled = false;
}
</script>

</body>
</html>

Related Tutorials