目录

XML DOM - 的 NodeList 对象


NodeList 对象表示节点的有序列表。


节点列表对象

节点列表中的节点可以通过其索引号(从0开始)进行访问。

节点列表保持最新。如果在节点列表或 XML 文档中删除或添加元素,列表会自动更新。

笔记:在节点列表中,节点按照 XML 文档中指定的顺序返回。

NodeList 对象属性

Property Description
length Returns the number of nodes in a node list

NodeList 对象方法

Method Description
item() Returns the node at the specified index in a node list