• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 JavaScript, TS 게시판 4강 버튼 onclick 질문

4강 버튼 onclick 질문

2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 글쓴이
  • #7236

    김민수
    참가자

      <div class="alert-box">
        <p>Alert 박스</p>
        <button type="button" onclick="close()">닫기</button>
      </div>
      <button type="button" onclick="open()">열기</button>

      <script>
        function open(){
          document.querySelector('.alert-box').style.display = 'block'
        }
        function close(){
          document.querySelector('.alert-box').style.display = 'none'
        }
      </script>

     

     

    /////////////

     

    .alert-box{
      background: rgb(184, 184, 253);
      color: blue;
      padding: 20px;
      border-radius: 5px;
      display: none;
    }

     

    JavaScript / jQuery 입문과 웹 UI개발  4강에서 똑같이 따라한다음 open 버튼을 누르면 display 가 block이  되어야하는데 

    열기 버튼을 누르면 html 자체가 사라집니다 ㅠㅠ  vscode를 사용중이며 열기 버튼 누를 시  라이브서버의 링크주소도 변경되는데 이런경우엔 어떻게 해야할까요 개발자도구로 봐도 html이 싹 사라져있네요

     

    #7238

    김민수
    참가자

    해결했습니다..

2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠