Input Range disabled Attribute
Example
Disable the slider control:
Output result:
Definition and Usage
The disabled attribute is used to set or return whether the slider control is disabled.
Elements with the disabled attribute are unusable and unclickable. Disabled elements are typically displayed in gray in the browser.
This attribute reflects the HTML disabled attribute.
Browser Support
All major browsers support the disabled attribute.
Note: Internet Explorer 9 and earlier versions do not support the HTML <input> element with the type="range" attribute.
Syntax
Return the disabled attribute:
Set the disabled attribute:
Attribute Values
| Value | Description | |
|---|---|---|
| true | false | Describes whether the slider control is available. true - The slider control is unavailable<br> false - Default. The slider control is available |
Technical Details
| Return Value: | Boolean, returns true if the slider control is unavailable, otherwise returns false | | --- | --- |
More Examples
Example
Check if the slider control is available:
Example
Disable or enable the slider control:
Related Pages
HTML Reference: HTML <input> disabled Attribute