Reputation: 46222
I have a field called City that is a drop down. It has a key value pair.
To get the value, I can simply do the following in Jquery:
var city = $("#city").val();
How do I get the key value though?
Upvotes: 0
Views: 132
Reputation: 7802
so you want the text of the selected option:
$('#city').find('option:selected').text();
Upvotes: 1