Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
HTMLCollection 의 메소드 item() 은 컬렉션 안의 특정 인덱스에 위치한 노드를 반환합니다.
참고 : HTMLCollection은 실시간이기 때문에, DOM을 변경하면 컬렉션 내의 노드도 변경됩니다. 따라서, 한 노드의 인덱스 값이 항상 일정하지는 않습니다.
반환받을 Node의 위치. HTMLCollection에 들어있는 요소들은 도큐먼트에 나타나는 순서와 동일합니다.
주어진 인덱스의 Node. index가 0보다 작거나 length 속성보다 크다면 null을 반환합니다.
item() 메소드는 HTMLCollection으로부터 순서가 매겨진 하나의 요소를 반환합니다. JavaScript에서, HTMLCollection을 배열처럼 다루는건 아주 쉽습니다. 아래의 예시를 보세요.
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 10월 10일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.