selected value from dropdown in jquery code example
Example 1: jquery get selected option value
var selectedOptionText = $('#mySelectID').find(":selected").text();
var selectedOptionVal = $('#mySelectID').find(":selected").val();
Example 2: get text selected option jquery
$('#id option:selected').text()
Example 3: how to get the value of dropdown in jquery
BY LOVE
$('#ddlName option:selected').val();
Example 4: select option value jquery
$("select.country").change(function(){
var selectedCountry = $(this).children("option:selected").val();
alert("You have selected the country - " + selectedCountry);
});
Example 5: get selected option value
var conceptName = $('#aioConceptName').find(":selected").val();
Example 6: get option value jquery
<select id="state">
<option value="state1" data-id="1">state1</option>
<option value="state2" data-id="2">state2</option>
<option value="state3" data-id="3">state3</option>
</select>
$('#state option[data-id="2"]').val();