Input Number disabled property
Disable the number field:
The output is:
Try it out . . .
Definitions and usages
The disabled property is used to set or return whether the number field is disabled.
Elements that use the disabled property are unavailable and non-clickable. D isabled elements are usually grayed out on the browser.
This property reflects the HTML disabled property.
Browser support
The disabled property is supported by all major browsers
Note: Internet Explorer 9 and earlier versions of IE do not support the use of the type-"number" property for the element of the .lt;input>
Grammar
Returns the disabled property:
Set the disabled property:
The property value
value | describe |
---|---|
true|false |
Describe if the NUMBER field is available.
|
Technical details
Return value: | Boolean value, if the number field is not available to return true, otherwise return false |
---|
More instances
See if the number field is available:
Try it out . . .
Disable or enable the number field:
document.getElementById("myNumber").disabled = true;
}
function undisableBtn() {
document.getElementById("myNumber").disabled = false;
}
Try it out . . .
Related pages
HTML Reference Manual: HTML slt;input> disabled properties
Input Number object