Get drop down menu value on Jqery
Posted
by Jerry
on Stack Overflow
See other posts from Stack Overflow
or by Jerry
Published on 2010-05-23T21:06:33Z
Indexed on
2010/05/23
21:10 UTC
Read the original article
Hit count: 277
Hi all
Got a simple question. I would like to get a drop down menu value when a use clicks it. I tried to write the code on my own, but couldn't do it. Any helps would be appreciated.
My Jquery
$("#week").change(function(){
var input=$("week: select").val();
alert(input); //display undefiend
My Html
<form id="week">
<select>
<option>Week 1</option>
<option>Week 2</option>
<option>Week 3</option>
<option>Week 4</option>
<option>Week 5</option>
</select>
</form>
© Stack Overflow or respective owner