let fileName = this.file.name.lastIndexOf(".");//取到文件名开始到最后一个点的长度 let fileNameLength = this.file.name.length;//取到文件名长度 let fileFormat = this.file.name.substring(fileName + 1, fileNameLength);//截 console.log(fileFormat);
JS截取文件后缀名
猜你喜欢
转载自www.cnblogs.com/xinchenhui/p/9044352.html
今日推荐
周排行