Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM OptionGroup Object

HTML DOM OptionGroup Object


OptionGroup Object

The OptionGroup object represents an HTML .

Accessing the OptionGroup Object

You can use getElementById() to access it element:

var x = document.getElementById("myOptgroup");

Try it

Creating the OptionGroup Object

You can use the document.createElement() method to create element:

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 tag