https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
Document.getElementsByClassName() - Web APIs | MDN
Document.getElementsByClassName() The getElementsByClassName method of Document interface returns an array-like object of all child elements which have all of the given class name(s). When called on the document object, the complete document is searched, i
developer.mozilla.org
여기서 여러가지 함수에 대한 설명을 얻을 수 있다.
visual studio code에서도 알수있는데, 원하는 함수를 적어놓고 그 위에 마우스 커서를 올려놓으면 설명을 읽을 수 있다.
위에 뜨는 설명을 읽어보면 (method) document.getElementsByClassName 이 함수는
(className: string) Class 데이터 타입이 string(글자)이고, HTMLCollectionOf<Element> 배열이 있는 엘리먼트 형태로 나온다.
반응형