Hassan khan
Last updated: December 22,2022
Disable html button
There is an attribute called disabled which disables your button.
Once the button is disabled then it will not be clicked.
This attribute may change with javascript. We can programmatically change the value of this attribute with javascript.
Here is snippet:
1
<button type="button" disabled> Click Me! </button>
With this attribute, we can disable input elements of HTML like text fields, checkboxes, date fields, etc.