-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; 
1
  • using jquery $("#meno).val(2015) Commented Mar 12, 2017 at 12:48

1 Answer 1

0
document.getElementById("menu").value = 2015; 
Sign up to request clarification or add additional context in comments.

2 Comments

Uncaught TypeError: document.getElementByid is not a function
Programming is case sensitive. Try again.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.