js获取项目名称

//获取路径
var pathName=window.document.location.pathname;
//截取,得到项目名称
var projectName=pathName.substring(0,pathName.substr(1).indexOf('/')+1);
原文地址:https://www.cnblogs.com/weibanggang/p/11016717.html