Help Center

Local Navigation

Object: HTMLOptionElement

Availability

BlackBerry® Device Software version 4.6 or later

Extends

HTMLElement

The HTMLOptionElement object represents an <option> element in an HTML document.

The <option> element encloses the text of an option in a selection list.

HTMLOptionElement properties

Property name

Type

Description

Status

Availability

defaultSelected

boolean

When true, indicates that the option is selected by default.

writable

4.6 or later

disabled

boolean

When true, indicates that the option is not available.

writable

4.6 or later

form

HTMLFormElement

Returns the form that contains the option. If this element is not contained by a form, this property returns null.

read only

4.6 or later

index

int

Returns the position of this option within the parent <select> element.

read only

4.6 or later

label

String

Specifies a label for the option.

writable

4.6 or later

selected

boolean

When true, indicates that the option is currently selected.

writable

4.6 or later

text

String

Specifies the text contained within the <option> element.

writable

4.6 or later

value

String

Specifies the value of the option that is sent to the server when the form is submitted.

writable

4.6 or later


Was this information helpful? Send us your comments.