select get selected option 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: jquery get selected option value
$("select.your-select").change(function(){
$(this).children("option:selected").val();
});
Example 4: get selected option value
var conceptName = $('#aioConceptName').find(":selected").val();
Example 5: javascript get selected option
let selectElement = document.getElementById("selectElement");
let valueSelected = selectElement.options[selectElement.selectedIndex].value;
var text= selectElement.options[selectElement.selectedIndex].text;
Example 6: use js to get select value
var sel = document.getElementById('scripts');
console.log( sel.value );