jquery_220217_1

SEUNGJU BAEK·2022년 2월 17일
0

sparta

목록 보기
2/2
<script>
    function q1() {
        $.ajax({
            type: "GET",
            url: "https://api.thecatapi.com/v1/images/search",
            data: {},
            success: function (response) {
              let imgurl = response[0]['url']
              $("#img-cat").attr("src", imgurl);
              
              @@ #img-cat을 imgurl로 이미지를 대체하기 @@
              
            }
        })
    }
</script>
profile
I'm Jake!

0개의 댓글