JS gets the content before the last slash in the URL
var url = window.location.href;
var index = url.lastIndexOf("\/");
str = url.substring(0,index+1);
console.log(str); // http://www.mywlaq.cn/archives/
JS gets the content after the last slash in the URL
var url = window.location.href;
var index = url.lastIndexOf("\/");
str = url.substring(index + 1,url.length); console.log(str); // 3390.html
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。