6
Próbuję utworzyć aplikację pogodową z interfejsem API OpenWeatherMap dla javascript. Kod mojej aplikacji internetowej to:Jak korzystać z interfejsu API OpenWeatherMap dla JavaScript?
<!DOCTYPE html>
<html>
<head>
<title>Weather</title>
<script src = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js"></script>
<script>
function gettingJSON(){
document.write("jquery loaded");
$.getJSON("api.openweathermap.org/data/2.5/weather?q=London&APPID=ee6596241130f193adf1ba90e625cc10",function(json){
document.write(json);
}
</script>
</head>
<body>
<button id = "getIt" onclick = "gettingJSON()">Get JSON</button>
</body>
</html>
Co ja tu się nie zgadza?
);} brakuje na końcu skryptu –