arturion
08-18-2003, 12:14 PM
I have a code which contents a select:
<form name="the_form">
<select name="the_select">
<option selected>option0
<option>option1
<option>option2
</select>
</form>
then, if I put
window.document.the_form.the_select.options[1].text
it will return the value "option1"
but I want to know how to make the script to return the value that is selected
I don't know if exists something like:
window.document.the_form.the_select.option[selected].text
or something like that
<form name="the_form">
<select name="the_select">
<option selected>option0
<option>option1
<option>option2
</select>
</form>
then, if I put
window.document.the_form.the_select.options[1].text
it will return the value "option1"
but I want to know how to make the script to return the value that is selected
I don't know if exists something like:
window.document.the_form.the_select.option[selected].text
or something like that