Option.index (Property)

The index position within the select object set.

Availability:

JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Property/method value type:Number primitive
JavaScript syntax:-myOption.index

When you define <OPTION> tags within a <SELECT> block, they instantiate objects to represent each option. These are then made available as members of a collection belonging to the Select object and accessible via its options[] property.

This property indicates the position of this Option object within that collection. The first Option object in the collection is located at index position zero. Note that modifying the set of objects in this collection can cause the index numbers of an option to change.

See also:Select.options[]

Property attributes:

ReadOnly.