select option javascript default code example
Example 1: html select default
<select>
<option value="" selected disabled hidden>Choose here</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
<option value="5">Five</option>
</select>
Example 2: javascript set select option
document.getElementById("mySelectID").value="my_value";
//note: setting value in html directly does not work <select value="my_value">