Help Center

Local Navigation

Object: HTMLSelectElement

Availability

BlackBerry® Device Software version 4.6 or later

Extends

HTMLElement

The HTMLSelectElement object represents a <select> element in an HTML document.

The <select> element specifies a selection list. A selection list can be a single-selection or a multiple-selection list.

HTMLSelectElement properties

Property name

Type

Description

Status

Support level

Availability

disabled

boolean

When true, indicates that the form control is not available.

writable

DOM 2 HTML

4.6 or later

form

HTMLFormElement

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

read only

DOM 2 HTML

4.6 or later

length

int

Specifies the number of <option> elements the selection list contains.

writable

DOM 2 HTML

4.6 or later

multiple

boolean

When true, indicates that more than one option may be selected from the list.

writable

DOM 2 HTML

4.6 or later

name

DOMString

Specifies the name of the form control. This is the name portion of the name-value pair that is submitted with the form.

writable

DOM 2 HTML

4.6 or later

options

HTMLOptionsCollection

Returns an index of the <option> elements contained within the selection list. Index positions begin at 0 and continue to HTMLOptionsCollection.length-1.

read only

DOM 2 HTML

4.6 or later

selectedIndex

int

Specifies the index position of the selected option.

writable

DOM 2 HTML

4.6 or later

size

int

Specifies the number of visible rows.

writable

DOM 2 HTML

4.6 or later

tabIndex

int

Specifies the tabbing order of the form control.

writable

DOM 2 HTML

4.6 or later

type

DOMString

Returns the type of form control. The value returned depends on the value of HTMLSelectElement.multiple:

  • When HTMLSelectElement.multiple has a value of true, the value for this property is "select-multiple".

  • When HTMLSelectElement.multiple has a value of false, the value for this property is "select-one".

read only

DOM 2 HTML

4.6 or later

value

DOMString

Specifies the value of the currently selected option(s). This is the value portion of the name-value pair that is submitted with the form.

writable

DOM 2 HTML

4.6 or later


Was this information helpful? Send us your comments.