【发布时间】:2016-03-29 06:44:03
【问题描述】:
我正在尝试验证字段并且我不断收到意外的令牌 { 但它是一个 if else 并且我不确定我做错了什么。任何帮助都会很棒。我只是在学习jquery。谢谢你
if ((project !== "") && (example !== "")
&& (location !== "") && (moreinfo !== "") && (email !== "")
&& (dateTime !== "") &&(phone !== "") ((agree !== "") && (validateEmail(email))){ //here!
$.ajax({
url: "website url",
data: { "entry123": allvariables above
},
type: "POST",
dataType: "xml",
statusCode: {
0: function () {
window.location.replace("index.html");
},
200: function () {
window.location.replace("thanks.html");
}
}
});
} else {
console.error(error)
var error = error;
}
}
【问题讨论】:
标签: javascript jquery html error-handling syntax-error