get option value jquery
var conceptName = $('#aioConceptName').find(":selected").val();$(document).ready(function(){
$("select.country").change(function(){
var selectedCountry = $(this).children("option:selected").val();
alert("You have selected the country - " + selectedCountry);
});$("#vacc_wellness_agegroups option:selected").val();$("#id option:selected").text();<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();
//output state2$('#ddlID').val();
$('#ddlID').text();
Also in JavaScript:
- update formgroup value angular
- fields.flat is not a function discord.js
- javascript async await returns undefined
- nodejs express server img src
- slice() javascript
- set padding jquery
- document ready javascript
- math.random js
- array sorting javascript mergesort
- fullcalendar reload events ajax
- jquery add class
- convert pdf to base64 javascript
- jQuery hasClass() - check for more than one class
- como percorrer um objeto js
- adding a default option in switch statements
- angular scroll to element horizontally
- get id of clicked element javascript
- js set cookie
- how to check if an element exists in an array of objects js
- javascript given range how to make sure array contains all values?
- sharing data using service angular 6
- CFBundleShortVersionString in app.json
- localecompare javascript
- REPLACE BROKEN IMAGES WITH A DEFAULT IMAGE