Select disabledProperty
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
![]()
![]()
![]()
![]()
![]()
All major browsers support the disabled property.
Other Extensions
Select Object