Search
 
SCRIPT & CODE EXAMPLE
 

HTML

jqury get selected option


<select id="myselect">
    <option value="1">Mr</option>
    <option value="2">Mrs</option>
    <option value="3">Ms</option>
    <option value="4">Dr</option>
    <option value="5">Prof</option>
</select>

<script>
$( "#myselect option:selected" ).val();
</script>
Comment

jquery get selected option value

$("select.your-select").change(function(){ 
	$(this).children("option:selected").val();
});
Comment

jquery get selected option value

var selectedOptionText = $('#mySelectID').find(":selected").text();//selected option text
var selectedOptionVal = $('#mySelectID').find(":selected").val();//selected option value
Comment

get selected option value jquery

$("#vacc_wellness_agegroups option:selected").val();
Comment

jquery find selected option in select

$('#dropdown').on('change', function() {
  var selected_option_value = $(this).find(":selected").val();
});
Comment

select selected value jquery

If you want to get the selected option text, you can use $(select element). text() . var text = $('#aioConceptName option:selected'). text();
If you want to get selected option value, you can use $(select element). val() . var val = $('#aioConceptName option:selected').val();
Comment

PREVIOUS NEXT
Code Example
Html :: regex find html comment 
Html :: only accept image file input 
Html :: how to make a whatsapp hyperlink html 
Html :: free video url for testing 
Html :: http://127.0.0.1:5500/favicon.ico 
Html :: html input not editable 
Html :: html text not markable 
Html :: bootstrap 5 overflow 
Html :: remove html tags from string python 
Html :: email anchor tag 
Html :: html video autoplay IPHONE 
Html :: html select required 
Html :: html disable first option 
Html :: add href to div 
Html :: Wrap the last word of a paragraph in span tags using jQuery 
Html :: center iframe 
Html :: flex direction column bootstrap 4 
Html :: html get redirect to another page on load 
Html :: href disable underline 
Html :: html pi 
Html :: Change the required text 
Html :: select in vee validate 
Html :: bootstrap 4 vertical align td 
Html :: html ngfor with index 
Html :: html form action target blank 
Html :: how to change background image in html 
Html :: html viewport meta tag 
Html :: responsive html 
Html :: show and hide div tag based on checkbox selection using javascript 
Html :: facebook icon html 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =