A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list.

interface HTMLCollectionBase {
    length: number;
    item(index: number): null | Element;
    [index: number]: Element;
}

层级 (查看完整内容)

可索引

属性

方法

属性

length: number

Sets or retrieves the number of objects in a collection.

方法

  • Retrieves an object from various collections.

    参数

    • index: number

    返回 null | Element