【发布时间】:2014-07-23 16:56:24
【问题描述】:
我找到了一种从 IMDb 中以舒适的 JSON 格式提取有关电视节目或电影的数据的方法:
http://imdbapi.com/?t=query。
非常棒,但是当我尝试使用本地 JS 实际使用数据时,它不起作用。
var data = $.ajax({
dataType: "json",
async: false,
cache: false,
crossDomain: true,
jsonp: true,
url: "http://imdbapi.com/?t=lost",
success: function() {
console.log( 'loaded successfuly. ' )
},
});
var poster = data.Poster;
console.log( poster );
由于 CORS,我正在使用 JSONP。这是控制台显示的内容:
"加载成功。
不明确的”
我不知道是什么问题!请帮忙。
- 奥伦
【问题讨论】:
标签: jquery json api jsonp imdb