The Button disabled property in HTML DOM is used to set or return whether a Button element would be disabled or not. A disabled element is un-clickable and unusable. It contains a boolean value.
Syntax: It is used to set the button disabled property.
buttonObject.disabled = "value"
- true: It defines that the Button element is disabled.
- false: It is the default value. It defines that the Button is not disabled.
Return Value: It returns a boolean value which represents the Button is disabled or not.
Before Click the Button:
After Click the Button:
Supported Browsers: The browser supported by DOM Button disabled property are listed below:
- Google Chrome
- Internet Explorer