如何只在两个输入不同时执行if语句,而不是当两个输入相同时。假设:
var a=prompt("have Input","");
var b=prompt("have Input","");
if(a && !b){alert("ok")}
else{"wrong"}当输入为真、输入为假、a为真、b为假时,如果a为false,b为真,则if语句不执行.How来解决这个问题,如果statement.What是解决问题的方法?
https://stackoverflow.com/questions/14577705
复制相似问题