Hello, I hope that someone would be able to help me to solve this simple problem.
My goal is to get the value in the array from selection drop down list.
Basically, I create an Array in Javascript and a selection drop down list in the body.
<script type="text/javascript">
var even = new Array(2, 4, 6);
</script>
.
.
.
<select id="evenNumbers">
<option value="1">two</option>
<option value="2">four</option>
<option value="3">six</option>
</select>
My question is how can I get the value in the Array if I select the option from the drop down list? e.g. when I select "two" from the drop down list, but I can get the value of "2" in the array in order to do some calculation.
Thanks.