DOM - NodeList对象

NodeList对象指定有序节点集合的抽象. NodeList中的项目可以通过整数索引访问,从0开始.

属性

下表列出了NodeList对象的属性 ;

属性类型描述
lengthunsigned long它给出了节点列表中的节点数.

方法

以下是NodeList对象的唯一方法.

S.No.方法&描述
1item()

它返回索引集合中的项目.如果index大于或等于列表中的节点数,则返回null.