1,获取后缀名
//得到后缀名 function get_suffix(filename) { pos = filename.lastIndexOf('.'); suffix = ''; if (pos != -1) { suffix = filename.substring(pos); } return suffix; }