select option with value jquery
xxxxxxxxxx
// retrive select data to select in html
$("#selectID option[value='".response.value."']").attr("selected", true);
// another option
$( "#myselect option:selected" ).val();
xxxxxxxxxx
<script>
$(document).ready(function() {
$("#status option[value='value']").attr("selected", true);
});
</script>
xxxxxxxxxx
<select id="menu">
<option value="1">Opción 1</option>
<option value="2">Opción 2</option>
<option value="3">Opción 3</option>
</select>
<script >
$(function () {
$("#menu option[value='2']").attr("selected", true);
});
</script>
xxxxxxxxxx
$('#dropdown').on('change', function() {
var selected_option_value = $(this).find(":selected").val();
});
xxxxxxxxxx
$(document).ready(function(){
$("select.country").change(function(){
var selectedCountry = $(this).children("option:selected").val();
alert("You have selected the country - " + selectedCountry);
});
xxxxxxxxxx
let payment_type = $("#olca_form_submit select[name='payment_type']")
.find(":selected")
.val();
xxxxxxxxxx
var conceptName = $('#aioConceptName').find(":selected").text();