Change the label/description of an option-group:
The label property sets or returns the value of the label attribute of an option-group.
The label attribute specifies a label/description for an option-group.
The label property is supported in all major browsers.
Return the label property:
Set the label property:
Value | Description |
---|---|
text | Specifies a label/description for the option-group |
Return Value: | A String, representing the label of the option-group |
---|
Return the label/description of an option-group:
The result of x will be:
HTML reference: HTML <optgroup> label attribute