IE9 jQuery Ajax 不工作
我正在使用 jQuery 1.6.1 和 IE9。我正在我的机器上运行该页面,尝试从服务器请求数据。我的 Javascript 看起来像这样:
var baseURL = "http://1.1.1.1/cgi-bin/ipcxml.cgi?";
var path = "scm:scm/data/system_names";
var fullURL = baseURL + path;
$.ajax (
{
url: fullURL,
cache: true,
context: $("#" + element),
crossDomain: true,
dataType: "xml",
type: "GET",
success: function (data) {
alert (data);
}
}
);
当我运行此代码并在 IE 开发人员工具中观察网络流量时,我没有看到请求发出。有人有什么想法吗?
I am using jQuery 1.6.1 and IE9. I am running the page on my machine trying to request data from a server. My Javascript looks like this:
var baseURL = "http://1.1.1.1/cgi-bin/ipcxml.cgi?";
var path = "scm:scm/data/system_names";
var fullURL = baseURL + path;
$.ajax (
{
url: fullURL,
cache: true,
context: $("#" + element),
crossDomain: true,
dataType: "xml",
type: "GET",
success: function (data) {
alert (data);
}
}
);
When I run this code and I watch for the network traffic in the IE developer tools, I don't see the request go out. Does anybody have any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的选项卡出现问题,其中的内容没有像其他浏览器那样更新。我扫描了网络,最后找到了解决方案:
IE安全性导致了与缓存相关的问题,因此将缓存设置为 false 解决了我的问题。希望有帮助
I was having problems with my tab, the content inside it was not updating like it did with other browsers. I scanned through the net and finally i found my solution:
IE security causes the cache related problem so turning the cache to false solved my prob. Hope it helps
我不知道这是否是问题的根本原因,但冒号 (
:
) 和斜杠 (/
) 字符必须是 在查询字符串中使用时进行编码。尝试:I don't know if it's the root cause of your problem, but colon (
:
) and slash (/
) characters have to be encoded when used in query strings. Try: