커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
3-8 강의대로 했는데
[왕초보] 코딩이 처음이어도 쉽게 배우는 웹개발 A to Z v0
3주차
북마크
전*영
댓글
1
추천
0
조회수
7
조회수
7
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


<!doctype html>

<html lang="ko">


<head>

   <meta charset="UTF-8">

   <title>Fetch 시작하기</title>

   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

   <script>

     function hey() {

       let url = 'http://spartacodingclub.shop/sparta_api/seoulair'

       fetch(URL).then(res => res.json()).then(data => {

         let rows = date['RealtimeCityAir']['row']

         rows.forEach(a => {

           let gu_name = a['MSRSTE_NM'];

           let gu_mise = a['IDEX_MVL'];

           console.log(gu_namegu_mise);

        });

      })

    }

   </script>

</head>


<body>

   <button onclick="hey()">fetch 연습!</button>

</body>


</html>


뭐가 잘못된거래요? 안되요 ㅠㅠ 눈이 시릴 정도로 열심히 봤는데 모르겠습니다 ㅠㅠ











취소
 공유
취소
댓글 0
댓글 알림
나의얼굴