一开始直接split(’.’),后来想文件名可能也有点点,比如nihao.ni.png
let fileName = 'nihao.ni.png'
let lastIndex = fileName.lastIndexOf('.')
let type = fileName.substring(lastIndex+1) // png
一开始直接split(’.’),后来想文件名可能也有点点,比如nihao.ni.png
let fileName = 'nihao.ni.png'
let lastIndex = fileName.lastIndexOf('.')
let type = fileName.substring(lastIndex+1) // png