Easy Tutorial
❮ Prop Input Time Required Prop Option Value ❯

Select disabled Attribute

Select Object


Example

Example 1

Disable the dropdown list:

document.getElementById("mydrop").disabled = true;

Output result:


Definition and Usage

The disabled attribute sets or returns whether the dropdown list is disabled.

A disabled input element is unusable and unclickable. The disabled attribute can be set until some other condition is met (such as selecting a checkbox, etc.).

Syntax

Set the disabled attribute:

Return the disabled attribute:


Browser Support

All major browsers support the disabled attribute.


Select Object

❮ Prop Input Time Required Prop Option Value ❯