스파르타코딩개발일지
스파르타 코딩 2주차 과제 및 후기
KeomBi
2022. 8. 13. 21:54
1주차에서 기상청api를 이용하여 현재 거주하고 있는 도시의 온도를 뽑아내오는것이였다
앞수업에서 충분히 이해를 했기때문에 쉽게 완료
$.ajax({
type: "GET",
url: "http://spartacodingclub.shop/sparta_api/weather/seoul",
data: {},
success: function (response) {
$('#temp').text(response['temp'])
let temp = response['temp']
console.log(msg,url)
}
})
온도도 추가했으니 습도도
$('#clouds').text(response['clouds'])
한줄만 추가하게되면 완성이다.
추가적으로 도시별로 습도와 온도가 슬라이드형식으로 나오는것을 해보고싶다