gpt4 book ai didi

jquery - “jQuery.getJSON”在 Internet Explorer 8 中不起作用

转载 作者:行者123 更新时间:2023-12-01 00:35:02 25 4
gpt4 key购买 nike

我正在使用 jQuery.getJSON 来获取 Facebook 好友列表,但我没有得到它。它在 Firefox 和 Chrome 中完美运行,但在 Internet Explorer 8 中不起作用。

jQuery.getJSON("https://graph.facebook.com/me/friends?access_token="+aToken,
function(data) {
alert(data);
}
);

另外,在做了更多研究之后,我也尝试使用此代码:

jQuery.ajax({
url:"https://graph.facebook.com/me/friends?access_token="+aToken,
type: 'json',
success: function(json) {
alert(json);
}
});

最佳答案

Internet Explorer 8 不支持 XMLHttpRequest 中的 CORS jQuery 正在使用的对象。 Internet Explorer 8 使用 XDomainRequest object其中jQuery doesn't support默认情况下。

关于jquery - “jQuery.getJSON”在 Internet Explorer 8 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8456621/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com