js小工具

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

你可能感兴趣的:(code)