121
rated 0 times
[
126]
[
5]
/ answers: 1 / hits: 25002
/ 12 Years ago, mon, april 2, 2012, 12:00:00
I have the following drop down list:
<select name=selSS1 id=select_value>
<option value=val0>sea zero</option>
<option value=val1>sea one</option>
<option value=val2>sea two</option>
<option value=val3>sea three</option>
<option value=val4>sea four</option>
</select>
I would like to dynamically select a value from that list using javascript:
I tried:
document.getElementById('select_value').selected =val3;
But the above code does not seem to work. Any help is most appreciated.
More From » javascript