Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="data">
- </div>
- <input type="text" value="Which city are you in?">
- <input type="button" value ="Submit" onclick="findWeather()">
- function findWeather() {
- $.get("http://api.openweathermap.org/data/2.5/forecast?q=Eindhoven&appid=*My_APP_ID*",
- function () {
- document.getElementById("data").innerHTML = data.list.main.temp;
- })
- }
- function findWeather(){
- $.get("http://api.openweathermap.org/data/2.5/forecast?q=Eindhoven&appid=*My_APP_ID*",
- function(data) {
- document.getElementById("data").innerHTML = data.list.main.temp;
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement