-1

HTML code :

<select id = "menu">
<option value="2017">2017</option>
<option value="2016">2016</option>
<option value="2015">2015</option>
</select>

What I have tried :

document.getElementById("menu").selectedIndex = 2015; 
Amir
  • 65
  • 6

1 Answers1

0
document.getElementById("menu").value =  2015;
Vic
  • 703
  • 6
  • 9