retrive values of two dropdown boxes without submitting the form
Posted
by
Kaustav Dey
on Stack Overflow
See other posts from Stack Overflow
or by Kaustav Dey
Published on 2014-08-23T09:52:50Z
Indexed on
2014/08/23
10:20 UTC
Read the original article
Hit count: 157
JavaScript
I have two dropdown boxes in a single form. How can I alert the values of both the dropdown boxes with onchange function on the second dropdown box without submitting the form.
<select name="abc1" id="abc1">
<option value="a">A</option>
<option value="B">B</option>
<option value="c">C</option>
</select>
<select name="abc2" id="abc2" onchange="getvalue()">
<option value="a">d</option>
<option value="e">E</option>
<option value="f">F</option>
</select>
© Stack Overflow or respective owner