实际上,您只需要添加
?callback=?,剩下的就由jQuery完成。
$(document).ready(function() { $.getJSON('http://example.com/api/get_cats?callback=?', function(fbResults) { document.write(fbResults.cats[0].title); });});
实际上,您只需要添加
?callback=?,剩下的就由jQuery完成。
$(document).ready(function() { $.getJSON('http://example.com/api/get_cats?callback=?', function(fbResults) { document.write(fbResults.cats[0].title); });});