我正在尝试为 openweather 网站创建一个非常简单的 json 调用,但是当我将 url 粘贴到它返回数据的浏览器中时,什么都没有返回。
这是我的代码
$(document).ready(function(){
$("button").click(function(){
$.getJSON('http://api.openweathermap.org/data/2.5/forecast?lat=35&lon=139',function(result){
document.write(feed);
});
});
});
这是一个小提琴http://jsfiddle.net/KfwU8/
让我开始的任何帮助都会很棒!谢谢