JavaScript » Select » selectedIndex

Syntax:
object.selectedIndex

This property, which is tainted by default, is an integer relating to the currently-selected option of a Select object. If, however, the Select object allows for multiple selections (i.e. when the <SELECT> tag includes the MULTIPLE attribute), the selectedIndex property will only return the index of the first option selected.

Examples

Code:
document.myForm.mySelect.selectedIndex
Explanation:

For example, this code would return the index of the selected option of a Select object called MySelect in MyForm.