Get selected text from a drop-down list (select box) using jQuery

03/22/2020 19:00:01

How can I get the selected text (not the selected value) from a drop-down list in jQuery?

Verified Answer (3737 Votes)

10/29/2009 18:05:38
$("#yourdropdownid option:selected").text();
3737

Answer #2 (263 Votes)

10/29/2009 18:04:28

Try this:

$("#myselect :selected").text();

For an ASP.NET dropdown you can use the following selector:

$("[id*='MyDropDownId'] :selected")
263

Answer #3 (211 Votes)

03/19/2012 16:41:05

The answers posted here, for example,

$('#yourdropdownid option:selected').text();

didn't work for me, but this did:

$('#yourdropdownid').find('option:selected').text();

It is possibly an older version of jQuery.

211
3
Hack Hex uses Stack Exchance API by the Stack Exchange Inc. to scrape questions/answers under Creative Commons license.