how to check value of select option in javascript?

hello,how to check value of select option in javascript?
[70 byte] By [Smita_Jadhava] at [2007-11-27 5:59:14]
# 1

the options are an array, so you can do something like this:

alert(document.yourform.yourselect.options[0].value);

If you want the value of the currently selected option, do this:

var yourselect = document.yourform.yourselect;

alert(yourselect.options[yourselect.selectedIndex].value);

gimbal2a at 2007-7-12 16:35:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...