HTML DOM 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 returns whether to disable the button.
Disabled elements are not available, can not be clicked. Disable display element is usually gray in your browser.
grammar
Set the disabled attribute:
button .disabled=true|false
Returns disabled properties:
button .disabled
Browser Support
All major browsers support disabled property
Button Objects