1 2 3 4 5 6 7 8 |
//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; } |
跪求网站前端模板。