현재 기온 알려주는 스크립트
https://api.openweathermap.org 가셔서 api 얻으시고const LS_GPSName = 'GPS';const API_KEY = '자신의 API 입력하세요';const weather = document.querySelector(".weather");function getWeather(lat,lon){ fetch( `https://api.openweathermap.org/data/2.5/weather?lat=${lat}&lon=${lon}&appid=${API_KEY}&units=metric` //api 호출해서 위도,경도,appid키값,화씨를 섭씨로 바꾸기 등을 넣어서 정보를 가져온다. ).then(function(data) { ..
지식·동향/컴퓨터정보
2024. 7. 10. 16:19