X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM OptionGroup Object


OptionGroup Object

The OptionGroup object represents an HTML <optgroup> element.

Access an OptionGroup Object

You can access an <optgroup> element by using getElementById():

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

Create an OptionGroup Object

You can create an <optgroup> element by using the document.createElement() method:

var x = document.createElement("OPTGROUP"); Try it

OptionGroup Object Properties

Property Description
disabled Sets or returns whether an option-group is disabled, or not
label Sets or returns the value the label attribute of an option-group

Standard Properties and Events

The OptionGroup object also supports the standard properties and events.


Related Pages

HTML reference: HTML <optgroup> tag



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook