An object of this type is returned by the files property of the HTML element; this lets you access the list of files selected with the element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage.

interface FileList {
    length: number;
    item(index: number): null | File;
    [index: number]: File;
}

可索引

  • [index: number]: File

属性

方法

属性

length: number

方法

  • 参数

    • index: number

    返回 null | File