javascript OPTION index
@March 15, 2008, 1:22 a.m.
index | Firefox/Netscape/NN 6 IE 3 Chrome/Safari/DOM 1 |
Read-only | |
Returns the zero-based index integer value of the current option object within the collection of options of the select element. The select object's selectedIndex property returns the index value of the option that is currently selected. |
|
Example | |
var whichItem = document.getElementById("myOption3").index; |
|
Value | |
Integer. |
|
Default | |
None. |
Permanent URL:
http://javascript.gakaa.com/option-index.aspx
Powered by Linode.