Select disabledProperty

Select 对象参考手册Select Object


Example

Example 1

Disable the dropdown list:

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

Output result:

Cats Dogs

Try it yourself »


Definition and Usage

The disabled property sets or returns whether a dropdown list is disabled.

Disabled input elements are neither usable nor clickable. You can set the disabled attribute until some other conditions are met (e.g., selecting a checkbox, etc.).

Syntax

Set the disabled property:

element.disabled=true|false

Return the disabled property:

element.disabled


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the disabled property.


Select 对象参考手册Select Object

Other Extensions