[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/API/HTMLCollection [Back]  [Original]

HTMLCollection - Web API | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

HTMLCollection

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.

HTMLCollection (arguments ) .

: HTMLCollection DOM , HTML .

HTML DOM HTMLCollection .

In this article

HTMLCollection.length

.

HTMLCollection.item()

. null .

HTMLCollection.namedItem()

ID . HTML name . null .

JavaScript

HTMLCollection . HTML ID : . . HTMLCollection .

js
var elem1, elem2;

// document.forms HTMLCollection

elem1 = document.forms[0];
elem2 = document.forms.item(0);

alert(elem1 === elem2); // "true"

elem1 = document.forms.myForm;
elem2 = document.forms.namedItem("myForm");

alert(elem1 === elem2); // "true"

elem1 = document.forms["named.item.with.periods"];

Specification
DOM
# interface-htmlcollection


Web Proxy Viewer  |  New URL  |  Original Page