The below code snippet explains how to get the value of the selected option from HTML Select dropdown using jQuery
<select id="mySelect">
<option value="1">Yes</option>
<option value="2">No</option>
</select>
<input type="button" id="demo" value = "Demo" />
<script type="text/javascript">
$("#demo").live("click", function () {
//Get text or inner html of the selected option
var selectedText = $("#mySelect option:selected").html();
alert(selectedText);
});
</script>
Explanation:
The button with ID demo is attached with a click event. When the button is clicked the text or inner HTML of the selected option of the HTML Select Dropdown with ID mySelect is fetched and displayed in alert.