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

  1. The form attribute returns the FORM element containing this control.
  2. The form attribute returns null if this control is not within the context of a form.
  3. The defaultSelected attribute represents the value of the HTML select attribute.
  4. The text attribute contains the text contained within the option element.
  5. The index attribute is the index of this OPTION in its parent SELECT.
  6. The disabled attribute indicates that this control is unavailable in this context.
  7. The label attribute is an option label for use in hierarchical menus.
  8. The selected attribute represents the current state of the corresponding form control in an interactive user-agent.
  9. The value attribute contains the current form control value.

If you have comments or suggestions, email me at mbrady@nist.gov