我有一个监护人 json 数据提要,我想将其在线拉入我的页面。
我已经使用了这个 javascript,但似乎没有任何东西可以从 json 中获取正确的内容;
$(document).ready(function() {
$.ajax({
type: "GET",
dataType: "jsonp",
cache: false,
url: "http://content.guardianapis.com/world/cuba?format=json&show-fields=trail-text%2Cheadline&order-by=newest&api-key=c3rr449rqqebmuxua9k5mdcz",
success: function(data) {
for (var i = 0; i < 12; i++) {
$("#cuban-news").append("<div class='guardian'><a target='_blank' href='" + webTitle + "'>Link</a></div>");
}
console.log(data);
}
});
});
这不会在错误方面抛出任何东西。
我最好使用像骨干网或下划线这样的js服务吗?
对此的任何帮助都会令人惊叹。