html 获取项目根路径

html 获取项目根路径

			function getContextPath(){   
			    var pathName = document.location.pathname;   
			    var index = pathName.substr(1).indexOf("/");   
			    var result = pathName.substr(0,index+1);   
			    return result;   
			} 


你可能感兴趣的:(easyui)