<script type="text/javascript">
var local = window.location;
var contextPath = local.pathname.split("/")[1];
var basePath = local.protocol+"//"+local.host+"/"+contextPath;
</script>
js中实现jsp中的basePath
最新推荐文章于 2019-04-20 14:48:51 发布
<script type="text/javascript">
var local = window.location;
var contextPath = local.pathname.split("/")[1];
var basePath = local.protocol+"//"+local.host+"/"+contextPath;
</script>