Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

select option value jquery

$("select.country").change(function(){
  var selectedCountry = $(this).children("option:selected").val();
  alert("You have selected the country - " + selectedCountry);
});
Comment

jquery selected option value

$(document).ready(function(){
    $("select.country").change(function(){
        var selectedCountry = $(this).children("option:selected").val();
        alert("You have selected the country - " + selectedCountry);
    });
Comment

jquery selected option value

 let payment_type = $("#olca_form_submit select[name='payment_type']")
      .find(":selected")
      .val();
Comment

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();

//output state2
Comment

select selected option value jquery

var conceptName = $('#aioConceptName').find(":selected").text();
Comment

jquery select option by value

$('.selDiv option[value="SEL1"]')
Comment

jquery select option value selected

$("div.id_100 select").val("val2").change();
Comment

select and select based on value in jquery

$('.id_100 option')
     .removeAttr('selected')
     .filter('[value=val1]')
         .attr('selected', true)
Comment

PREVIOUS NEXT
Code Example
Javascript :: log odd numbers js 
Javascript :: javascript explode space 
Javascript :: How to get latitude and longitude from address in angular 6 
Javascript :: rgb javascript 
Javascript :: encrypt decrypt in vanilla javascript 
Javascript :: js array from 
Javascript :: export table data to excel in jquery 
Javascript :: js iso date split 
Javascript :: create fooer on print page with jquery 
Javascript :: express server sockjs 
Javascript :: useeffect react example 
Javascript :: js datetime format 
Javascript :: mui date picker width 
Javascript :: js find value in array 
Javascript :: js stop typing event 
Javascript :: mongodb mongoose aggregate two collections using lookup & format the result set. 
Javascript :: api fetch in react js 
Javascript :: nested array filter 
Javascript :: how to convert array converted to string back to array javasccript 
Javascript :: enable button 
Javascript :: AsyncStorage.getItem undefined is not an object 
Javascript :: generate random color array javascript 
Javascript :: onchange value in hidden input 
Javascript :: how to get random value less than in array js 
Javascript :: ping ip address using javascript 
Javascript :: check which is dubicate in object of array 
Javascript :: hammer js 
Javascript :: javascript how to extract a value outside function 
Javascript :: jquery id value input 
Javascript :: javascript check if string contains a text substring 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =