Jquery code to get text or value of selected option in select element

by rajesh 2014-06-12 16:48:13

Jquery code to get text or value of selected option in select element

$("#id option:selected").text();

for selecting when the id is in a variable
$(string+" option:selected").text();


for getting value os selected option
$("#id option:selected").val();
 
725
like
0
dislike
0
mail
flag

You must LOGIN to add comments