The OptionGroup object represents an HTML <optgroup> element.
You can access an <optgroup> element by using getElementById():
You can create an <optgroup> element by using the document.createElement() method:
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 |
The OptionGroup object also supports the standard properties and events.
HTML reference: HTML <optgroup> tag
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!