javascript SELECT value

value NN 6 IE 4 DOM 1  

 

Read/Write  

This is the current value associated with the form control that is submitted with the name/value pair for the element. All values are strings, but they may represent other kinds of data, including Boolean and numeric values. For browsers earlier than IE 4 and Netscape 6, scripts must retrieve the selected option's value by using the select object's selectedIndex property as an index into the options array, then inspect each option object's selected property to find the true one(s).

 
Example
 
if (document.forms[0].medium.value == "CD-ROM") {
 ...
}
 
Value

String.

 
Default

None.


  • O.....
    #1
    2012-05-18
    Reviewing ...
1732,Nickname,Homepage or email,Comments here,Add comment