Day-20 element.classList

So Eun Ahn·2021년 1월 27일
0

JavaScript

목록 보기
23/26
post-thumbnail

Element.classList

The Element.classList is read-only property property that returns the class name(s) of an element, as a DOMTokenList object.

It can be modyfied with add(), remove(), toggle(), etc..

modal.classList.remove('hidden');
modal.classList.add('hidden');

모달윈도우 버튼 클릭시 활성화/비활성화 작업

profile
오늘도 새로운 도전을 한다

1개의 댓글

comment-user-thumbnail
2022년 8월 27일

안녕하세요! 혹시 첨부하신 코드 스니펫 테마가 뭔지 알 수 있을까요?

답글 달기