Here i have read how to set a form option selected by index
<select name="sel">
<option value="o1">option1</option>
<option value="o2">option2</option>
</select>
document.getElementsByName('sel')[0].selectedIndex = 0; or
document.getElementsByName('sel')[0].selectedIndex = 1;
but is it possible to set an option selected by referencing an option value instead of index?