javascript - When the submit button is clicked, I want to get the value of a dropdownlist -


How do I choose an option in the drop down list when a button is clicked?

  & lt; Id = "d1" & gt; & Lt; Option value = "1" & gt; A & lt; / Options & gt; ... & lt; / Select & gt; Click the  

  $ ('# btn') (function () { Var value = $ ('# d1'). Val ();})  

$ (element) .val () Returns the value of any element element is .


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -