'disabled' Example : disabled « Javascript Properties « JavaScript Reference

'disabled' Example

    
<html>
<body>
<script>
    function function1() {
        document.all.myButton.disabled = true;
    }
    function function2() {
        document.all.myButton.disabled = false;
    }
</script>
<input id="myButton" type="button" value="Disable" onClick="function1();">
<input type="button" value="Enable" onClick="function2();">
</body>
</html>

    
      
      








Related examples in the same category

1.'disabled' Syntax and Note
2.'disabled' Possible Values
3.'disabled' is applied to