Gettting selected value of a dropdown (<select>) element in jQuery
- by shyam
How can I get the selected value of a dropdown box using jQuery?
I tried using
var value = $('#dropDownId').val(); and
var value = $('select#dropDownId option:selected').val();
but both returns an empty string.