const extname = (filename) => {
var index1=filename.lastIndexOf(".");
if(index1==-1||index1==0){
return '';
}
var index2=filename.length;
var postf=filename.substring(index1,index2);
return postf;
}
const extname = (filename) => {
var index1=filename.lastIndexOf(".");
if(index1==-1||index1==0){
return '';
}
var index2=filename.length;
var postf=filename.substring(index1,index2);
return postf;
}
本文标题:获取文件后缀名
本文链接:https://www.haomeiwen.com/subject/rkynxqtx.html
网友评论