개발_팬명록(팬페이지)02

춤추는 병따개·2022년 11월 30일
0

📚초보 수업 일지

목록 보기
7/11
post-thumbnail

이전 팬명록 작업


강의 내용
API(통로)를 통해 정보 실시간 불러오기

  • 구별 미세먼지 수치 API 확인
  • 서울시 따릉이 실시간 대여소 현황 API 제공
  • 르탄이 캐릭터 교체 (스파르타코딩클럽 GET 이용)
  • 팬명록 날씨 API 제공
  <script>
      $(document).ready(function(){
         $.ajax({
           type: "GET",
           url: "http://spartacodingclub.shop/sparta_api/weather/seoul",
           data: {},
           success: function (response) {
             let temp = response['temp']
             let icon = response['icon'];

             $('#temp').text(temp)
             $('#wether').arrt('src',icon);
             console.log(response);
           }
         })
  })
  </script>
  
  ...
  jquery 사용하는 코드 확인
  

<body>
  <div class="mytitle">
    <h1>십센치(10cm) 팬명록</h1>
    <p> 현재 기온 : <span id="temp">00.0</span><image id="wether" src="http://openweathermap.org/img/w/01n.png"></image></p>

...
아이디 설정. 
profile
FE 개발 공부 중

0개의 댓글