July 1998
Intermediate to advanced
1456 pages
65h 5m
English
selectedIndex — NN 2 IE 3 DOM 1
Read/Write
The zero-based integer of the option selected by the user. If the
SELECT element is set to allow multiple
selections, the selectedIndex property returns the
index of the first selected item (see the selected
property). You can use this property to gain access to the value or
text of the selected item, as shown in the example.
var list = document.forms[0].selectList var listValue = list.options[list.selectedIndex].value
Positive integer.
None.
Read now
Unlock full access