Example Disable a drop-down list: <select disabled="disabled"> <option value="volvo">Volvo&l...
Example
Disable a drop-down list:<select disabled="disabled"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> |
Definition and Usage
The disabled attribute specifies that a drop-down list should be disabled.A disabled drop-down list is unusable and un-clickable.
The disabled attribute can be set to keep a user from using the drop-down list until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript is required to remove the disabled value, and make the drop-down list usable.
Browser Support
The disabled attribute is supported in all major browsers.Syntax
<select disabled="value"> |
Attribute Values
Value | Description |
---|---|
disabled | Disables a drop-down list |