WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM OptionGroup Object


OptionGroup Object

The OptionGroup object speaks to a HTML <optgroup> element.

Access an OptionGroup Object

You can get to a <optgroup> component by utilizing getElementById():

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

Create an OptionGroup Object

You can make a <optgroup> component by utilizing the document.createElement() method:

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

OptionGroup Object Properties

Property Description
disabled Sets or returns whether a choice gathering is incapacitated, or not
label Sets or returns the esteem the mark characteristic of a choice group