How can I get the selected value of a dropdown box using jQuery? I tried using
var value = $(\'#dropDownId\').val();
and
var value = $('#dropDownId:selected').text()
Should work fine, see this example:
$(document).ready(function(){ $('#button1').click(function(){ alert($('#combo :selected').text()); }); });
Test 1 Test 2