Gettting selected value of a dropdown (<select>) element in jQuery

Posted by shyam on Stack Overflow See other posts from Stack Overflow or by shyam
Published on 2010-05-06T11:08:51Z Indexed on 2010/05/06 11:18 UTC
Read the original article Hit count: 131

Filed under:

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.

© Stack Overflow or respective owner

Related posts about jQuery