我正在尝试使用新的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' 如果我想一次读入多个文件,但又想让它们按顺序到达。(在B.csv之前处理A.csv,等等)。这是可以实现的吗?
发布于 2013-04-16 00:51:47
[].slice.call(files)将其转换为实数组,然后您可以对其使用.sort。
https://stackoverflow.com/questions/16020593
复制相似问题