编辑:使用不同版本的 jQuery 解决了问题。我有以下ajax调用
$.validator.addMethod("UserIDEmail", function(value, element) {
return (this.optional(element) || value.slice(-8) == "FXCM.com" || value.slice(-8) == "fxcm.com");
}, "You must use a @FXCM.com email address");
$("#FXCMLogIn").validate({
errorContainer: "#messageBox",
errorLabelContainer: "#messageBox ul",
errorElement: "li",
submitHandler: function(form) {
$('input[type="submit"]').next(".processing").show();
var dataString = $(form).serialize();
$.ajax({
type: $(form).attr('method'),
url: form.action,
data: dataString,
clearForm: true,
success: function(data) {
var answer = $(data).find("td:eq(3)").text();
var message = $(data).find("td:eq(5)").text();
if (answer==="True") {
$("#bottomContent").load("FXCM-Conversion-Content.php #FXCMForm");
} else {
$('.processing').hide();
$('input[type="text"], input[type="password"]').val("");
$('#messageBox').show().html('<ul><li>' + message + '</li></ul>');
}
}
});
return false;
},
rules: {
payerEmail: {
required: true,
email: true,
UserIDEmail: true
},
password: {
required: true,
minlength:3,
maxlength:15
}
},
messages: {
payerEmail: {
required: "Please Enter Your User ID"
},
password: {
required: "Please Enter Your Password",
minlength: "Must be at least 3 characters",
maxlength: "Must be less than 15 characters"
}
}
});
它没有显示正确的触发内容/页面部分,而是切换到“浏览器模式:IE9 文档模式:Quirks”并在控制台“HTML1113:文档模式从 IE9 标准重新启动到 Quirks”。进行调用的页面和正在加载的页面内容都具有有效的 DOCTYPE。我试过元标签<meta http-equiv="X-UA-Compatible" content="IE=edge" />
,但无济于事。有人遇到类似的事情吗?
谢谢