커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
명언 새로고침 api 가 작동을 안해요!
undefined주차
북마크
정*현
댓글
3
추천
0
조회수
15
조회수
15
답변 완료

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

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


아이디 부여해서 코드 세팅은 되었는데요

시간 api는 적용이 되어서 실시간으로 바뀌는데

명언은 먹히지 않는 것 같습니다!



스파르타 즉문즉답

js 파일에 있는 랜덤명언 url 클릭해보니

스파르타 즉문즉답

어플리케이션 에러페이지가 뜨는데 혹시 관련이 있을까요?


작성한 코드 및 에러 메세지

index.js 는 코드스니펫을 그대로 복사한거라 별도 첨부하지는 않았습니다.

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


<head>
        <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <title>나만의 동기부여 홈화면 만들기</title>


    <script src="index.js"></script>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');


        * {
            font-family: 'Poppins', sans-serif;
        }


        body {
            background-image: url("https://content.r9cdn.net/rimg/dimg/30/0c/6318617a-city-35982-163ff913019.jpg?width=1366&height=768&xhint=2421&yhint=1876&crop=true");
            background-position: center;
            background-size: cover;


            color: white;
        }
        


        .time{
            font-size: 100px;
            font-weight: bold;
        }
        .greet{
            font-size: 50px;
        }


        .todo{
            font-size: 30px;
        }
        .author{
            font-size: 25px;
            font-style: italic;
        }


        .main {
            width: 100vw;
            height: 80vh;


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


        .quote {
            width: 100vw;
            height: 20vh;


            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
    </style>


    <script>
    </script>
</head>


<body>
    <div class="main"> 
        <div id="time" class="time">12:00</div>
        <div class="greet">안녕하세요, 잘 살 님</div>
        <div class="todo">스파르타코딩클럽 몰입하기</div>
        </div>
    <div class="quote">
        <div id="author" class="author">-명언의 저자-</div>
        <div id="content" class="content">"명언의 내용"</div>
    </div>
</body>


</html>

Tip 1) </> 아이콘을 눌러 코드박스를 만들어 보세요.

Tip 2) Ctrl+A(맥의 경우 Command+A) 단축키로 코드를 한 번에 선택할 수 있어요!




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