js截取文件名
var img=”http://pdfzhq.com/uploads/app/file/2022062116425486613.docx”
var str = img.substring(img.lastIndexOf(‘/’) + 1)
结果:2022062116425486613.docx
未经允许不得转载:肥猫博客 » js从URL中截取文件名
js截取文件名
var img=”http://pdfzhq.com/uploads/app/file/2022062116425486613.docx”
var str = img.substring(img.lastIndexOf(‘/’) + 1)
结果:2022062116425486613.docx
未经允许不得转载:肥猫博客 » js从URL中截取文件名