Get selected text and value from drop down

danejCode Snippets

I often find myself needing the selected text from a drop down box. Using jQuery, a simple way to get the text is:


$("#dropdownId").children("option:selected").text();

To get the value of the selected item, you can use:


$("#dropdownId").children("option:selected").val();