How to get the text of the selected value of a dropdown list?
jquery, select
Solution
You can use `option:selected` to get the chosen option of the `select` element, then the `text()` method:
$("select option:selected").text();
Here's an example:
console.log($("select option:selected").text());
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<select>
<option value="1">Volvo</option>
<option value="2" selected="selected">Saab</option>
<option value="3">Mercedes</option>
</select>
Problem
Possible Duplicate: jQuery get specific option tag text How to get the text of the selected option of a select using jquery? I have a dropdown list and I want to know the text of the selected item. For example: ``` <select> <option value="1">Volvo</option> <option value="2">Saab</option> <option value="3">Mercedes</option> </select> ``` If I know the selected value, how can I get it's text value? For instance, if the value is `1` how can I get `Volvo`? Help much appreciated.