使用 JS 实现获取文件扩展名? cgctm6 2020-08-12 184 阅读1分钟 let suffix = fileNames.substring(fileNames.lastIndexOf(".")); let suffix = fileNames.slice(((fileNames.lastIndexOf(".") - 1) >>> 0) + 2);