var upFileName = $("#fileToUpload").val();var index1=upFileName.lastIndexOf(".");var index2=upFileName.length;var suffix=upFileName.substring(index1+1,index2);//后缀名