获取文件后缀名(zip,rar等)
var filename = file.name;
var index1 = filename.lastIndexOf(".");
var index2 = filename.length;
var ext = filename.substring(index1 + 1, index2);//后缀名
本文来自博客园,作者:quitpoison,转载请注明原文链接:https://www.cnblogs.com/quitpoison/p/9875779.html