开发者

how to get the dropdown value?

Hi i am using dropdown for display the timezone.The timezone values are come from database.Whenever the user change the value 开发者_如何学CI need to alert the new timezone.For example if user change the time GMT+5.30 to GMT+6.30 then I want to alert GMT+6.30.Here the the dropdown values coming as an array?What can I do to get the values?


If you're using select and you have set values for your options, you can:

$("select#dropdown").change(function(){
  alert($(this).val());
});

To do this, you need the jQuery framework. http://www.jquery.com/


checkout http://www.texotela.co.uk/code/jquery/select/ plugin for handling select element, very handy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜