获取URl到系统名称

var PathName = window.location.pathname.substring(1);
var ProjectName = PathName.substring(0, PathName.indexOf("/"));
var URL = window.location.protocol + "//" + window.location.host + "/" + ProjectName;
原文地址:https://www.cnblogs.com/zhipeng007/p/12105502.html