Javascript Reference
Categories: OPTION

javascript OPTION index

@March 15, 2008, 1:22 a.m.
indexFirefox/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.


Powered by Linode.