Javascript Internet Explorer上的JQuery Ajax错误

Javascript Internet Explorer上的JQuery Ajax错误,javascript,jquery,ajax,internet-explorer,Javascript,Jquery,Ajax,Internet Explorer,我正在发出一个Ajax请求,它在所有浏览器中都工作,但在InternetExplorer中它不工作。我需要一个适用于InternetExplorer9的工具+ 这就是要求: function loadYoutubeVideos(youtubeUrl){ var url = 'youtubeUrl'; $.ajax({ type: 'GET', dataType: "json", url: url, success: function (responseData,

我正在发出一个Ajax请求,它在所有浏览器中都工作,但在InternetExplorer中它不工作。我需要一个适用于InternetExplorer9的工具+

这就是要求:

function loadYoutubeVideos(youtubeUrl){
var url = 'youtubeUrl';
$.ajax({
    type: 'GET',
    dataType: "json",
    url: url,
    success: function (responseData, textStatus, jqXHR) {
        objYoutubeVideos = responseData;
        //more functions, blablabla

    },
    error: function (responseData, textStatus, errorThrown) {
        console.log(textStatus, errorThrown);
        //error functions
    }   
});
}

我正在为加载Facebook页面内容编写一些代码。我该怎么办?

您是否尝试过使用
jsonp
格式

json
格式在跨域(不同域)使用时存在问题

因此,您需要使用
jsonp
而不是
json
jsonp
使用javascript回调来解决跨域问题

更多:


您不需要为api请求创建管道


Youtube支持
jsonp
使用
&callback=
参数格式化。

有什么错误?什么不起作用?IE不喜欢跨域ajax请求。。。您应该对服务器执行ajax调用,并从服务器发送api请求,然后将结果通过管道传回客户端。