DOM의 CRUD 조작
- Create
createElement() append() prepend() appendChild()
- Read
querySelector() querySelectorAll() getElementById() getElementsByClassName() getElementsByTagName() getElementsByName()
- Update
classList.add() classList.remove() classList.toggle() classList.replace() setAttribute() id value innerHTML innerText textContent
- Delete
remove() removeChild() value = '' innerHTML = '' innerText = '' textContent = ''