Baseline Widely available
HTMLCollection
ì ë©ìë item()
ì 컬ë ì
ìì í¹ì ì¸ë±ì¤ì ìì¹í ë
¸ë를 ë°íí©ëë¤.
Syntaxì°¸ê³ :
HTMLCollection
ì ì¤ìê°ì´ê¸° ë문ì, DOMì ë³ê²½íë©´ 컬ë ì ë´ì ë ¸ëë ë³ê²½ë©ëë¤. ë°ë¼ì, í ë ¸ëì ì¸ë±ì¤ ê°ì´ íì ì¼ì íì§ë ììµëë¤.
var element = HTMLCollection.item(index);
íë¼ë¯¸í°
index
ë°íë°ì Node
ì ìì¹. HTMLCollection
ì ë¤ì´ìë ììë¤ì ëí먼í¸ì ëíëë ììì ëì¼í©ëë¤.
주ì´ì§ ì¸ë±ì¤ì Node
. index
ê° 0ë³´ë¤ ìê±°ë length ìì±ë³´ë¤ í¬ë¤ë©´ null
ì ë°íí©ëë¤.
item()
ë©ìëë HTMLCollection
ì¼ë¡ë¶í° ììê° ë§¤ê²¨ì§ íëì ìì를 ë°íí©ëë¤. JavaScriptìì, HTMLCollection
ì ë°°ì´ì²ë¼ ë¤ë£¨ëê±´ ì주 ì½ìµëë¤. ìëì ìì를 ë³´ì¸ì.
var c = document.images; // HTMLCollectionì
ëë¤
var img0 = c.item(0); // ì´ë ê² item() ë©ìë를 ì´ì©í ì ìì§ë§
var img1 = c[1]; // ì´ë ê² í기íëê² ì½ê³ ë ë³´í¸ì ì
ëë¤
ë¸ë¼ì°ì í¸íì± See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4