js获取项目名称

//获取路径
var pathName=window.document.location.pathname;
//截取,获得项目名称
var projectName=pathName.substring(0,pathName.substr(1).indexOf('/')+1);
相关文章
相关标签/搜索