function getContextPath(){ var path = window.location.href; path = path.substring(0, path.lastIndexOf("/")); path = path.substring(path.lastIndexOf("/"), path.length); return path; } window.alert(getContextPath());
js取当前项目名称
如果有使用请标明来源:http://www.cnblogs.com/duwenlei/