HTMLOptionElement Interface
The HTMLOptionElement Interface is a selectable choice.
IDL Definition
Interface HTMLOptionElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute boolean defaultSelected;
readonly attribute DOMString text;
readonly attribute long index;
attribute boolean disabled;
attribute DOMString label;
readonly attribute boolean selected;
attribute DOMString value;
};
Semantic Requirements
- The form attribute returns the FORM element containing this control.
- The form attribute returns null if this control is not within the context of a form.
- The defaultSelected attribute represents the value of the HTML select attribute.
- The text attribute contains the text contained within the option element.
- The index attribute is the index of this OPTION in its parent SELECT.
- The disabled attribute indicates that this control is unavailable in this context.
- The label attribute is an option label for use in hierarchical menus.
- The selected attribute represents the current state of the corresponding form control in an interactive user-agent.
- The value attribute contains the current form control value.
If you have comments or suggestions, email me at mbrady@nist.gov