Input Reset disabled Property - Find out if a Reset button is disabled or not: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Reset

Description

Input Reset disabled Property - Find out if a Reset button is disabled or not:

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() {/* w  w  w.  j ava 2s .co m*/
    document.getElementById("myReset").disabled = true;
    var v = document.getElementById("myReset").disabled;
    console.log(v);
}
function enable() {
    document.getElementById("myReset").disabled = false;
    var v = document.getElementById("myReset").disabled;
    console.log(v);

}
</script>

</body>
</html>

Related Tutorials