现在我有只有1 IF语句:添加3 IF语句的jQuery
它像:如果4天巴黎选择选择& 1人,然后显示一个div:
if (personPValue == "4 Days Paris" && numAantal == "1") {
$("#t-extracost-90").show();
extraCost90 = 90;
} else {
$("#t-extracost-90").hide();
extraCost90 = 0;
}
但我想在if语句中添加更多的选择选项,现在我只是复制这个和编辑和过去的新规则,这是工作正常,
我可以在一个较短的wa ÿ?因为现在我的网页越来越长
我只想做这样的事情:
if (personPValue == "4 Days Paris" && "3 Days London" && "3 Days Italy" numAantal == "1")
但不工作:(
IF 4天巴黎 & 4天伦敦 & 3天意大利被选中& 人比显示DIV:#T-extracost-90
@ d3xt3r检查更新回答 – Tushar
谢谢,它的工作原理! – d3xt3r
试试这个:'if((personPValue ==“4 Days Paris”|| personPValue ==“3 Days London”|| personPValue ==“3 Days Italy”)&& numAantal ==“1”)' – Tushar