인프런 커뮤니티 질문&답변
화면전환은 되었는데 id qna 파트 에 임의로 쓴 p태그가 보이지 않습니다
작성
·
341
1
<button type="button" class="btn btn-outline-danger mt-2" onclick="js:begin()">Let's Start</button>
</section>
<section id="qna">
<p>215151</p>
</section>
<section id="result">
</section>
<script src="./js/start.js" charset="utf-8"></script>
</div>
</body>
</html>
start.js
const main = document.querySelector("#main");
const qna = document.querySelector("qna");
function begin(){
main.style.display = "none";
qna.style.display = "block";
}
이런식으로 뜹니다 ㅠ






qna라는 변수를 정의할 때, querySelector가 잘못되어 있는 것 같습니다~