<aside> <img src="notion://custom_emoji/83c75a39-3aba-4ba4-a792-7aefe4b07895/2e82dc3e-f514-8084-8cc0-007a4092ebbf" alt="notion://custom_emoji/83c75a39-3aba-4ba4-a792-7aefe4b07895/2e82dc3e-f514-8084-8cc0-007a4092ebbf" width="40px" />
학습 목표
</aside>
<aside> <img src="notion://custom_emoji/83c75a39-3aba-4ba4-a792-7aefe4b07895/2e82dc3e-f514-8084-8cc0-007a4092ebbf" alt="notion://custom_emoji/83c75a39-3aba-4ba4-a792-7aefe4b07895/2e82dc3e-f514-8084-8cc0-007a4092ebbf" width="40px" />
실습 목표
<aside> <img src="notion://custom_emoji/83c75a39-3aba-4ba4-a792-7aefe4b07895/2fe2dc3e-f514-8006-95d9-007a99d996b6" alt="notion://custom_emoji/83c75a39-3aba-4ba4-a792-7aefe4b07895/2fe2dc3e-f514-8006-95d9-007a99d996b6" width="40px" />
진행 방식
<aside>
버튼을 클릭했을 때 화면에 표시된 사용자 이름과 프로필 이미지의 주소를 자바스크립트로 실시간 변경하는 과정을 연습합니다.
</aside>

<aside>
최신 문서 제어 메서드를 사용하여 웹 화면에 새로운 동물 이름 요소를 맨 앞에 추가하고 화면에서 즉시 삭제하는 기능을 구현합니다.
</aside>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
window.addEventListener("DOMContentLoaded", function() {
const animal4 = document.createElement('li');
const animal4Txt = document.createTextNode('불독');
animal4.appendChild(animal4Txt);
const animals = document.querySelector('.animal');
const prepend = document.getElementById('prepend');
prepend.addEventListener("click", function() {
animals.prepend(animal4);
});
const remove = document.getElementById('remove');
remove.addEventListener("click", function() {
animals.remove(animal4);
});
});
</script>
<ul>
<li class="animal">사자</li>
<li class="animal">호랑이</li>
<li class="animal">얼룩말</li>
</ul>
<button id="prepend">삽입</button>
<button id="remove">삭제</button>
</body>
</html>

<aside>
입력 양식에 작성한 텍스트를 단축 표기법으로 가져와 출력하고 classList 속성을 통해 상자의 디자인을 실시간으로 제어하는 심화 과정을 진행합니다.
</aside>