Solution
var selectedid=$("#dropdownname").find('option:selected').attr('id');
Explanation
This will find the id of selected dropdown option and store it in the variable selectedid.
Say Bye to Bugs
var selectedid=$("#dropdownname").find('option:selected').attr('id');
This will find the id of selected dropdown option and store it in the variable selectedid.
Leave a comment