Get and Set Dropdown List Selected Value with jQuery

0
Our Reader Score
[Total: 0 Average: 0]
Dropdownlist Get/Set Value: Get and set drop-down box selected value. In web pages while form submission many time we commonly use drop-down list, this post explains how to get / fetch dropdown list selected value. In jQuery we get drop-down list selected by using .val() method. The .val() method is primarily used to get the values of form elements such as input, select and text area.

Description: Get the current value of the first element in the set of matched elements.

Html:

 jQuery: Here the jQuery code by using .val() method we get the id /value of selected drop-down list,

2nd and easier way

Try it Yourself »


Hope you enjoyed this tutorial. If you have any recommendations, please let us know what you think in the comment section below! See you again next time!

 


Get your Printable Copy

NO COMMENTS

LEAVE A REPLY