HTML DOM Input Button disabled property
Examples
Example 1
Disable a button:
<script>
document.getElementById("firstbtn").disabled=true;
</script>
document.getElementById("firstbtn").disabled=true;
</script>
Output:
try it"
Definition and Usage
disabled property sets or return button is available.
disabled element is not available, that is not clickable. Disabling elements in the browser typically rendered in gray.
grammar
Set the disabled attribute:
element .disabled=true|false
Returns disabled properties:
element .disabled
Browser Support
All major browsers support disabled property
Input Button objects