-
let type = /.[^.]+$/.exec(name).toUpperCase();
-
function getType(file){
var index1=filename.lastIndexOf(".");
var index2=file.length;
var type=file.substring(index1,index2).toUpperCase();
return type;
}
js获取图片后缀名
最新推荐文章于 2024-04-18 14:53:51 发布
let type = /.[^.]+$/.exec(name).toUpperCase();
function getType(file){
var index1=filename.lastIndexOf(".");
var index2=file.length;
var type=file.substring(index1,index2).toUpperCase();
return type;
}