Prop Optgroup Disabled
# OptionGroup disabled Property
[ OptionGroup Object](#)
## Example
Disable an option-group:
document.getElementById("myOptgroup").disabled=true;
Output:
BMW Mercedes Volvo Saab Koenigsegg
[Try it Β»](#)
* * *
## Definition and Usage
The disabled property sets or returns whether an option-group is disabled.
A disabled element is unusable and unclickable. Typically, disabled elements are rendered gray in browsers by default.
* * *
## Browser Support

The disabled property is supported in all major browsers.
* * *
## Syntax
Return the disabled property:
_optiongroupObject_.disabled
Set the disabled property:
_optiongroupObject_.disabled=true|false
## Property Values
| Value | Description |
| --- | --- |
| true|false | Specifies whether the option-group is disabled. * true - The option-group is disabled * false - Default. The option-group is not disabled. |
## Technical Details
| Return Value: | A Boolean. Returns true if the option-group is disabled, otherwise false. |
| --- |
* * *
## More Examples
## Example
Check if an option-group is disabled:
var x = document.getElementById("myOptgroup").disabled;
document.getElementById("demo").innerHTML=x;
The _x_ output will be:
true
[Try it Β»](#)
* * *
## Related Articles
HTML Reference: (#)
* * OptionGroup Object](#)
YouTip