相关疑难解决方法(0)

对FileList对象进行排序

我正在尝试使用新的File API对输入文件进行排序.它返回的列表似乎是不可变的:

var x = "";
var files = e.target.files; // FileList object
// Loop through the FileList and render image files as thumbnails.

files.sort();

> Uncaught TypeError: Object #<FileList> has no method 'sort' 
Run Code Online (Sandbox Code Playgroud)

如果我想一次读入多个文件,但我希望它们按顺序到达.(A.csv之前处理B.csv等).这可以实现吗?

javascript html5 file

8
推荐指数
1
解决办法
2812
查看次数

标签 统计

file ×1

html5 ×1

javascript ×1