커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
2주차 숙제
undefined주차
북마크
김*겸
댓글
3
추천
0
조회수
13
조회수
13
답변 완료

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

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


2주차 숙제 중 scriipt 부분 틀린게 없는데 왜 온도가 변하지 않을까요?



스파르타 즉문즉답




작성한 코드 및 에러 메세지

<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
            integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
            crossorigin="anonymous"></script>

    <title>스파르타코딩클럽 | 부트스트랩 연습하기</title>
    <style>
        * {
            font-family: 'Song Myung', serif;
        }

        .mytittle {
            width: 100%;
            height: 250px;

            background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://search.pstatic.net/common/?src=http%3A%2F%2Fblogfiles.naver.net%2FMjAyMTEyMjBfNjIg%2FMDAxNjM5OTg0MTY3MTI2.QEA43DO6tGO-ORTWyqVTgsnoD08_VE_3IVt0ba8WGvEg.HcKrdhbwsddTnZ5Eb6r6NjtYWONdG6dM4MKpp_n7Uy0g.JPEG.seuy7409%2F1639982271898.jpg&type=sc960_832");
            background-position: center;
            background-size: cover;

            color: white;

            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;}

        .mysing {
            max-width: 500px;
            width: 95%;

            margin: 20px auto 20px auto;

            box-shadow: 0px 0px 3px 0px black;
            padding: 20px;
        }

        .form-floating {
        }

        .mybut {
            margin-top: 15px;
        }

        .card-body1 {
            max-width: 500px;
            width: 95%;

            margin: 20px auto 0px auto;

            box-shadow: 0px 0px 3px 0px gray;
            padding: 20px;

        }

        .card-body2 {
            max-width: 500px;
            width: 95%;

            margin: 20px auto 0px auto;

            box-shadow: 0px 0px 3px 0px gray;
            padding: 20px;

        }

        .card-body3 {
            max-width: 500px;
            width: 95%;

            margin: 20px auto 0px auto;

            box-shadow: 0px 0px 3px 0px gray;
            padding: 20px;

        }
    </style>
    <script>    
        $(document).ready(function() {
            $.ajax({
                type: "GET",
                url: "http://spartacodingclub.shop/sparta_api/weather/seoul",
                data: {},
                success: function (response) {
                    $('#temp').text(response['temp'])
                }
            })
        }
    </script>
</head>

<body>
    <div class="mytittle">
        <h1>성시경 팬명록</h1>
        <p>현재기온 : <span id = "temp">00.0</span></p>
    </div>
</body>
<div class="mysing">
    <div class="form-floating mb-3">
        <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com">
        <label for="floatingInput">닉네임</label>
    </div>

    <div class="form-floating">
        <input type="password" class="form-control" id="floatingPassword" placeholder="Password">
        <label for="floatingPassword">응원댓글</label>
    </div>
    <div class="mybut">
        <button type="button" class="btn btn-dark">응원남기기</button>
    </div>
</div>

<div class="card-body1">
    <blockquote class="blockquote mb-0">
        <p>새로운 앨범 너무 멋져요!</p>
        <footer class="blockquote-footer">김구라</cite></footer>
    </blockquote>
</div>
<div class="card-body2">
    <blockquote class="blockquote mb-0">
        <p>새로운 앨범 너무 멋져요!</p>
        <footer class="blockquote-footer">이석훈</cite></footer>
    </blockquote>
</div>
<div class="card-body3">
    <blockquote class="blockquote mb-0">
        <p>새로운 앨범 너무 멋져요!</p>
        <footer class="blockquote-footer">김창겸</cite></footer>
    </blockquote>
</div>
</html>




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