链接中获取文件名
?
'算得上是-test.pdf' 獲取文件名?
var str = 'http://aaa.com/s/ddd/算得上是-test.pdf';console.log(str.match(/([^/*.]+)\.\w+$/)) console.log(str.match(/([^/*.]+)\.\w+$/)[0]) //
?
轉載于:https://www.cnblogs.com/cssfirefly/p/6163370.html
總結
- 上一篇: 浦发信用卡倍富金入口在哪里?为什么我没有
- 下一篇: {{view 视图层}}微信小程序