we have a drop down an ID, Name Pair.
Example
Rahul has ID of 1
Chand has ID of 2
Parthavi has ID of 3
When I do the followng:
but in case we want selected text in jquery for a dropdown
then
Example
Rahul has ID of 1
Chand has ID of 2
Parthavi has ID of 3
When I do the followng:
alert($('#Crd').val());
and we select Rahul , we get 1but in case we want selected text in jquery for a dropdown
then
$('#dropdownId option:selected').text();
No comments:
Post a Comment