var upFileName = $("#fileToUpload").val();
var index1=upFileName.lastIndexOf(".");
var index2=upFileName.length;
var suffix=upFileName.substring(index1+1,index2);//后缀名
2023-07-29 22:34:25
var upFileName = $("#fileToUpload").val();
var index1=upFileName.lastIndexOf(".");
var index2=upFileName.length;
var suffix=upFileName.substring(index1+1,index2);//后缀名