IE9 下的 Jquery Ajax 问题
我使用下面的代码使用 jquery 和 ASP.net 调用页面方法
$.ajax({
type: "POST",
url: url + "/" + method,
contentType: "application/json;",
data: jData,
async: true,
success: function (res) { if (succ) { succ(res); } },
error: function (xhr, status, error) {
NTF.Notify(NTF.GENERIC_ERROR);
if (err) {
err(xhr, status, error);
}
}
});
一切都工作正常,直到我将以下元标记引入到我的页面以便 css 半径与 IE9 一起使用
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
现在代码运行,它输入success 函数,但随后页面刷新,我不知道是什么原因导致的,代码在 Chrome、FF 和 IE 中运行良好,没有那个元标记。
有什么想法吗?
I was using the following code to call a page method using jquery and ASP.net
$.ajax({
type: "POST",
url: url + "/" + method,
contentType: "application/json;",
data: jData,
async: true,
success: function (res) { if (succ) { succ(res); } },
error: function (xhr, status, error) {
NTF.Notify(NTF.GENERIC_ERROR);
if (err) {
err(xhr, status, error);
}
}
});
Everything was working fine, till i introduced the following meta tag to my pages in order for the css radius to work with IE9
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Now the code runs, it enters the success function, but then the page refreshes, I have no idea what's causing it, the code works fine in Chrome, FF and IE without that meta tag.
any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的元标签是在导入JQuery之前吗?这篇博客文章< /a> 似乎表明在 JQuery 之后声明元标记时可能会遇到奇怪的情况。它专门讨论了字符集,但可能与您的问题有关。
Is your meta tag before you import JQuery? This blog post seems to indicate that you can run into weird cases when you declare a meta tag after JQuery. It specifically talks about charset, but may be related to your problem.