Easy Tutorial
❮ Jsref Tolocaletimestring Prop Canvas Imagedata Data ❯

OptionGroupdisabled Attribute

OptionGroup Object

Example

Disable an option-group:

Output result:


Definition and Usage

The disabled attribute sets or returns whether the option group is disabled.

Disabled elements are unusable and unclickable. By default, disabled elements are typically rendered as gray in the browser.


Browser Support

All major browsers support the disabled attribute.


Syntax

Return the disabled attribute:

Set the disabled attribute:

Attribute Values

Value Description
true false Specifies whether the option group is disabled. true - The option-group is disabled<br>false - Default. The option group is not disabled.

Technical Details

| Return Value: | Boolean, returns true if the option group is disabled, otherwise returns false. | | --- | --- |


More Examples

Example

Check if the option group is disabled:

x Output result:


Related Articles

HTML Reference: HTML <optgroup> disabled Attribute


OptionGroup Object

❮ Jsref Tolocaletimestring Prop Canvas Imagedata Data ❯