DOM NodeList對象
NodeList對象指定有序節點集合的抽象。 NodeList中的項目可通過整數索引訪問,它的索引從0開始。
1. 屬性
下表列出了NodeList對象的屬性 -
屬性
類型
描述
length
unsigned long
它給出了節點列表中的節點數。
2. 方法
以下是NodeList對象的唯一方法。
序號
方法
描述
1
item()
它返回集合中的索引項。 如果索引大於或等於列表中的節點數,則返回null。
NodeList對象指定有序節點集合的抽象。 NodeList中的項目可通過整數索引訪問,它的索引從0開始。
下表列出了NodeList對象的屬性 -
屬性
類型
描述
length
unsigned long
它給出了節點列表中的節點數。
以下是NodeList對象的唯一方法。
序號
方法
描述
1
item()
它返回集合中的索引項。 如果索引大於或等於列表中的節點數,則返回null。