【发布时间】:2014-04-17 12:14:55
【问题描述】:
我正在尝试从 cdn.animenewsnetwork.com 获取数据,与 API 有关的信息是 here。我将如何使用 jQuery 访问它?
当我在域上的 chrome 控制台中时,就这么简单:
$.ajax({
type: "GET",
url: "http://cdn.animenewsnetwork.com/encyclopedia/api.xml?title=~jin",
dataType: 'xml',
success: function(responseXML){
console.log(responseXML);
},
error:function(results){
console.log(results);
}
});
我知道使用dataType: 'jsonp' 的技巧,但这不适用于此xml。我将如何克服这个问题?
【问题讨论】:
标签: jquery xml cross-domain xss