日期:2014-05-16 浏览次数:20324 次
function getFileName(path){ var pos1 = path.lastIndexOf('/'); var pos2 = path.lastIndexOf('\\'); var pos? = Math.max(pos1, pos2) if( pos<0 ) return path; else return path.substring(pos+1); }