May 06, 2021 JavaScript with HTML DOM Reference book
1. HTML DOM Option Group object
3. OptionGroup object properties
4. Standard properties and events
The OptionGroup object represents an HTML- and opt-group-and-gt;
You can use getElementById() to access the elements of the .lt;optgroup:
var x = document.getElementById("myOptgroup"); try it
You can use the document.createElement() method to create the element of the .lt;optgroup:
var x = document.createElement("OPTGROUP"); try it
Attributes | describe |
---|---|
disabled | Set or return to whether or not the option group is disabled. |
label | Set or return the value of the Label property of the option group. |