Select.options.value : Select : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Select »

 

Select.options.value







The value property returns the value of the option that is selected in that instance of a select box.












<html>
    <form name="myForm">
    <select name="mySelect" onChange='alert(mySelect.options[selectedIndex].value)'>
        <option value=A>AA</option>
        <option value=B name=TEST>BB</option>
        <option value=CC>CC</option>
        <option value=DD>DD</option>
      </select>
    </form>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Select