现在的位置: 首页 > 综合 > 正文

JS小工具

2013年07月16日 ⁄ 综合 ⁄ 共 195字 ⁄ 字号 评论关闭
//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; 
} 

抱歉!评论已关闭.