<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
最新推荐文章于 2021-03-18 18:54:41 发布
<script type="text/javascript">
var local = window.location;
var contextPath = local.pathname.split("/")[1];
var basePath = local.protocol+"//"+local.host+"/"+contextPath;
</script>