js 获取字符串中最后一个斜杠后面的内容
所属栏目: 网站开发 | 更新时间:2018-1-20 | 阅读:3982 次
var str = "/asdasf/asfaewf/agaegr/trer/rhh"; var index = str .lastIndexOf("\/"); str = str .substring(index + 1, str .length); alert(str );
var str = "/asdasf/asfaewf/agaegr/trer/rhh"; var index = str .lastIndexOf("\/"); str = str .substring(index + 1, str .length); alert(str );