Help Center

Local Navigation

HTML element: <option>

Availability

Partial support as of BlackBerry® Device Software version 3.7.

Full support as of BlackBerry Device Software version 4.6.

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

Differences between HTML, XHTML, and XHTML-MP

None.

Attributes

Attribute

Value(s)

Description

Supported in

disabled

When specified, this attribute indicates that the option is initially disabled.

4.6 or later

label

text

This attribute allows you to specify a label for the option. This attribute is useful when the content of the <option> element is excessively long.

4.6 or later

selected

When specified, this attribute indicates that the option is initially selected.

4.6 or later

value

text

This attribute specifies the initial value of the element. If this attribute is not set, the initial value is set to the contents of the <option> element.

4.6 or later

Common attributes

The <option> element supports the following common attributes:

  • class
  • dir
  • id
  • lang
  • style
  • title

4.6 or later

Event attributes

The <option> element supports the following events:

  • onclick
  • onkeydown
  • onkeypress
  • onkeyup
  • onmousedown
  • onmousemove
  • onmouseout
  • onmouseover
  • onmouseup

4.6 or later

Index


Was this information helpful? Send us your comments.