Interface HTMLOptionElement

All Superinterfaces:
Element, EventTarget, HTMLElement, InnerHTML, Node, NonDocumentTypeChildNode, ParentNode
All Known Implementing Classes:
HTMLOptionElementImpl

public interface HTMLOptionElement extends HTMLElement
<option> elements and inherits all classes and methods of the HTMLElement interface.
  • Method Details

    • isDefaultSelected

      boolean isDefaultSelected()
      Sets or retrieves the status of an option.
      Returns:
      a boolean.
    • setDefaultSelected

      void setDefaultSelected(boolean defaultSelected)

      setDefaultSelected.

      Parameters:
      defaultSelected - a boolean.
    • isDisabled

      boolean isDisabled()

      isDisabled.

      Returns:
      a boolean.
    • setDisabled

      void setDisabled(boolean disabled)

      setDisabled.

      Parameters:
      disabled - a boolean.
    • getForm

      HTMLFormElement getForm()
      Retrieves a reference to the form that the object is embedded in.
      Returns:
      a HTMLFormElement object.
    • getIndex

      int getIndex()
      Sets or retrieves the ordinal position of an option in a list box.
      Returns:
      a Integer object.
    • getLabel

      String getLabel()
      Sets or retrieves a value that you can use to implement your own label functionality for the object.
      Returns:
      a String object.
    • setLabel

      void setLabel(String label)

      setLabel.

      Parameters:
      label - a String object.
    • isSelected

      Boolean isSelected()
      Sets or retrieves whether the option in the list box is the default item.
      Returns:
      a boolean.
    • setSelected

      void setSelected(Object selected)

      setSelected.

      Parameters:
      selected - a boolean.
    • getText

      String getText()
      Sets or retrieves the text string specified by the option tag.
      Returns:
      a String object.
    • setText

      void setText(String text)

      setText.

      Parameters:
      text - a String object.
    • getValue

      String getValue()
      Sets or retrieves the value which is returned to the server when the form control is submitted.
      Returns:
      a String object.
    • setValue

      void setValue(String value)

      setValue.

      Parameters:
      value - a String object.