js获取当前应用名
document.location.pathname
function getContextPath() {
var contextPath = document.location.pathname;
var index =contextPath.substr(1).indexOf("/");
contextPath = contextPath.substr(0,index);
delete index;
return contextPath;
}
document.location.pathname
function getContextPath() {
var contextPath = document.location.pathname;
var index =contextPath.substr(1).indexOf("/");
contextPath = contextPath.substr(0,index);
delete index;
return contextPath;
}