org.w3c.dom.html

Interface HTMLOptionElement

public interface HTMLOptionElement extends HTMLElement

A selectable choice. See the OPTION element definition in HTML 4.0.
Method Summary
booleangetDefaultSelected()
Stores the initial value of the selected attribute.
booleangetDisabled()
The control is unavailable in this context.
HTMLFormElementgetForm()
Returns the FORM element containing this control.Returns null if this control is not within the context of a form.
intgetIndex()
The index of this OPTION in its parent SELECT.
StringgetLabel()
Option label for use in hierarchical menus.
booleangetSelected()
Means that this option is initially selected.
StringgetText()
The text contained within the option element.
StringgetValue()
The current form control value.
voidsetDefaultSelected(boolean defaultSelected)
voidsetDisabled(boolean disabled)
voidsetIndex(int index)
voidsetLabel(String label)
voidsetValue(String value)

Method Detail

getDefaultSelected

public boolean getDefaultSelected()
Stores the initial value of the selected attribute.

getDisabled

public boolean getDisabled()
The control is unavailable in this context. See the disabled attribute definition in HTML 4.0.

getForm

public HTMLFormElement getForm()
Returns the FORM element containing this control.Returns null if this control is not within the context of a form.

getIndex

public int getIndex()
The index of this OPTION in its parent SELECT.

getLabel

public String getLabel()
Option label for use in hierarchical menus. See the label attribute definition in HTML 4.0.

getSelected

public boolean getSelected()
Means that this option is initially selected. See the selected attribute definition in HTML 4.0.

getText

public String getText()
The text contained within the option element.

getValue

public String getValue()
The current form control value. See the value attribute definition in HTML 4.0.

setDefaultSelected

public void setDefaultSelected(boolean defaultSelected)

setDisabled

public void setDisabled(boolean disabled)

setIndex

public void setIndex(int index)

setLabel

public void setLabel(String label)

setValue

public void setValue(String value)