HTML select disabled property
Examples
A disabled drop-down list:
<select disabled>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
try it"
Browser Support
All major browsers support the disabled attribute.
Definition and Usage
disabled attribute is a Boolean attribute.
disabled attribute specifies the drop-down list should be disabled.
Disabled drop-down list is neither available, nor click.
You can set the disabled property until certain conditions are met (such as selecting a check box), before resuming the use of users of the drop-down list. You can then use JavaScript to remove the value of the disabled attribute so that the drop-down list becomes available.
Differences between HTML 4.01 and HTML5
no.
Differences between HTML and XHTML
In XHTML, prohibit attribute minimization, disabled attribute must be defined as <select disabled = "disabled">.
grammar
<select disabled>
HTML <select> tag