String str = "12344.jpg";
String pic = str.substring(str.lastIndexOf("."));
System.out.println(pic);
js获得文件的后缀名
//上传文件类型限制
function isExcel(){
var fileName = document.getElementById("fileName").value;
var lastName = fileName.substring(fileName.lastIndexOf("."));
}