js获取项目名称

//获取路径
var pathName=window.document.location.pathname;
//截取,得到项目名称
var projectName=pathName.substring(0,pathName.substr(1).indexOf('/')+1);
posted @ 2019-06-13 15:22  韦邦杠  阅读(795)  评论(0编辑  收藏  举报