Latest

recent

HTML Select disabled attribute

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
HTML Select disabled attribute Reviewed by 1000sourcecodes on 20:51 Rating: 5
Powered by Blogger.