select option value jquery
$("select.country").change(function(){
var selectedCountry = $(this).children("option:selected").val();
alert("You have selected the country - " + selectedCountry);
});
select option value jquery
$("select.country").change(function(){
var selectedCountry = $(this).children("option:selected").val();
alert("You have selected the country - " + selectedCountry);
});
jquery: get selected option of the drop down list
$('#ddlID').val();
$('#ddlID').text();
how to get value from select option using input name in jquery
document.getElementById('prod_addcart21').addEventListener('click', function () {
if ($('select[name="variation[1]"]').val() == '') {
alert('Please, choose an option 1');
return false;
} else if ($('select[name="variation[2]"]').val() == '') {
alert('Please, choose an option 2');
} else if ($('select[name="variation[3]"]').val() == '') {
alert('Please, choose an option 3');
} else {
alert("product added to cart")
}
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us