[我正在尝试使用jQuery函数getJSON从openweathermap.org提取数据,但存在一些问题

问题描述 投票:0回答:1

'''

var apiKey =“ 54df40e238084fbf095d3540271e48a0”;var URL =“ api.openweathermap.org/data/2.5/weather?q=London&appid =” + apiKey;

$(document).ready(function(){

$.getJSON(URL,function(data){
    console.log(data);
})

});'''

javascript jquery json api weather-api
1个回答
0
投票

URL错误,您需要执行以下操作。

© www.soinside.com 2019 - 2024. All rights reserved.