HTML DOM OptionGroup Object
OptionGroup Object
The OptionGroup object represents an HTML
Accessing the OptionGroup Object
You can use getElementById() to access it
var x = document.getElementById("myOptgroup");
Try it
Creating the OptionGroup Object
You can use the document.createElement() method to create
var x = document.createElement("OPTGROUP");
Try it
OptionGroup Object Properties
| property | Description |
|---|---|
| disabled | Sets or returns whether the option group is disabled. |
| label | Sets or returns the value of the label attribute of the option group. |
Standard properties and events
The OptionGroup object also supports the standard property and Events.
Related Articles
HTML Reference Manual:HTML