Dmi*_*sky 0 javascript regex window.location
使用字符串http://www.example.com/section_one/index.html如何index使用RegExp 返回?
PS:index.html也接受回归.
你不需要使用正则表达式.这很简单:
var url = document.URL;
var currentPage= url.split("/").pop();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
172 次 |
| 最近记录: |