Input Reset disabled attribute
Definition and Usage
disabled
Sets or returns whether the reset button should be disabled.
Disabled elements are not accessible and cannot be clicked. By default, disabled elements are usually displayed in gray in the browser.
This property reflects the HTML disabled attribute.
See also:
HTML Reference Manual:HTML <input> disabled Attribute
Example
Example 1
Disable the reset button:
document.getElementById("myReset").disabled = true;
Example 2
Check if the reset button is disabled:
var x = document.getElementById("myReset").disabled;
Example 3
Disable and enable the reset button:
function disable() { document.getElementById("myReset").disabled = true; } function undisable() { document.getElementById("myReset").disabled = false; }
Syntax
Return the disabled attribute:
resetObject.disabled
Set the disabled attribute:
resetObject.disabled = true|false
Attribute Value
Value | Description |
---|---|
true|false |
Specifies whether the reset button should be disabled
|
Technical Details
Return Value: | Boolean value, returned if the reset button is disabled true ; otherwise return false . |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |