A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/apis/file/FileList below:

FileList ยท WebPlatform Docs

FileList Summary

FileList is an object which represents an array of individually selected files from the underlying system.

Properties
length
length returns the number of files in the FileList object. If there are no files, this attribute must return 0.
Methods
item
item returns the indexth File object in the FileList. If there is no indexth File object in the FileList, then this method must return null.
Events

No events.

Examples

iterates over all the files selected by the user using an input element


var fileInput = document.getElementById("myfileinput");


var files = fileInput.files;
var file;


for (var i = 0; i < files.length; i++) {

    
    file = files.item(i);
    
    file = files[i];

    alert(file.name);
}
Related specifications
W3C File API Specification
W3C Working Draft
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4