JS中获取类似JSP 中的basePath的方法

来源:互联网 发布:手机闪存测试软件 编辑:程序博客网 时间:2024/06/05 09:05
var local = window.location;var contextPath = local.pathname.split("/")[1];var basePath = local.protocol+"//"+local.host+"/"+contextPath;


原创粉丝点击