记忆角落

  • {{ item.name }}
  • 首页
  • 关于
  • 归档
  • 邻居
  • 捐赠

JS文件中获取contextPath的方法

  • 郭良俊只狗
  • 2018-09-18
  • 2
	//JS文件中获取contextPath的方法
	function getContextPath() { 
		var contextPath = document.location.pathname; 
		var index =contextPath.substr(1).indexOf("/"); 
		contextPath = contextPath.substr(0,index+1); 
		delete index; 
		return contextPath; 
	}

© 2012 - 2023 记忆角落 网站统计
Theme by Wing
粤ICP备14056850号-1 又拍云CDN赞助