Is there something wrong with the code? Because, when I am removing the OR in the statement, I am getting the right output, but when I'm inserting the ||
the output that I'm getting is what's in the statement where the OR operator is located.
$(document).ready(function(){
$("#select1").change(function(){
if($(event.target).val() == 'AK'){
$("#select2").change(function(){
if($(event.target).val() == 'LLC'){
$('#txt6').val('250.00');
}else{
$('#txt6').val('250.00');
}
});
}else if($(event.target).val() == 'AR' || 'CO' || 'HI' || 'IA' || 'MS'){
$("#select2").change(function(){
if($(event.target).val() == 'LLC'){
$('#txt6').val('50.00');
} else{
$('#txt6').val('50.00');
}
});
}else
if($(event.target).val() == 'AZ'){
$("#select2").change(function(){
if($(event.target).val() == 'LLC'){
$('#txt6').val('50.00');
} else{
$('#txt6').val('60.00');
}
});
}else
}else
if($(event.target).val() == 'WI'){
$("#select2").change(function(){
if($(event.target).val() == 'LLC'){
$('#txt6').val('103.00');
} else{
$('#txt6').val('103.00');
}
});
}else
{
$("#select2").change(function(){
if($(event.target).val() == 'LLC'){
$('#txt6').val('186.00');
} else{
$('#txt6').val('186.00');
}
});
}
});
});
Aucun commentaire:
Enregistrer un commentaire