javascript OPTION text

textNN 2 IE 3 DOM 1  

Read/Write  

Provides the text associated with the option element. This text is located between the start and end tags; it is what appears in the select element on screen. A hidden value associated with the list item can be stored, retrieved, and changed via the value property.

 
Example
 
var list = document.forms[0].selectList;
var listItemText = list.options[list.selectedIndex].text;
 
Value

String.

 
Default

None.


1565,Nickname,Homepage or email,Comments here,Add comment