public interface

HTMLOptionElement

implements HTMLElement
org.w3c.dom.html.HTMLOptionElement

Class Overview

A selectable choice. See the OPTION element definition in HTML 4.0.

See also the Document Object Model (DOM) Level 2 Specification.

Summary

[Expand]
Inherited Constants
From interface org.w3c.dom.Node
Public Methods
abstract boolean getDefaultSelected()
Represents the value of the HTML selected attribute.
abstract boolean getDisabled()
The control is unavailable in this context.
abstract HTMLFormElement getForm()
Returns the FORM element containing this control.
abstract int getIndex()
The index of this OPTION in its parent SELECT , starting from 0.
abstract String getLabel()
Option label for use in hierarchical menus.
abstract boolean getSelected()
Represents the current state of the corresponding form control, in an interactive user agent.
abstract String getText()
The text contained within the option element.
abstract String getValue()
The current form control value.
abstract void setDefaultSelected(boolean defaultSelected)
abstract void setDisabled(boolean disabled)
abstract void setLabel(String label)
abstract void setSelected(boolean selected)
abstract void setValue(String value)
[Expand]
Inherited Methods
From interface org.w3c.dom.Element
From interface org.w3c.dom.Node
From interface org.w3c.dom.html.HTMLElement

Public Methods

public abstract boolean getDefaultSelected ()

Represents the value of the HTML selected attribute. The value of this attribute does not change if the state of the corresponding form control, in an interactive user agent, changes. Changing defaultSelected , however, resets the state of the form control. See the selected attribute definition in HTML 4.0.

public abstract boolean getDisabled ()

The control is unavailable in this context. See the disabled attribute definition in HTML 4.0.

public abstract HTMLFormElement getForm ()

Returns the FORM element containing this control. Returns null if this control is not within the context of a form.

public abstract int getIndex ()

The index of this OPTION in its parent SELECT , starting from 0.

public abstract String getLabel ()

Option label for use in hierarchical menus. See the label attribute definition in HTML 4.0.

public abstract boolean getSelected ()

Represents the current state of the corresponding form control, in an interactive user agent. Changing this attribute changes the state of the form control, but does not change the value of the HTML selected attribute of the element.

public abstract String getText ()

The text contained within the option element.

public abstract String getValue ()

The current form control value. See the value attribute definition in HTML 4.0.

public abstract void setDefaultSelected (boolean defaultSelected)

public abstract void setDisabled (boolean disabled)

public abstract void setLabel (String label)

public abstract void setSelected (boolean selected)

public abstract void setValue (String value)