var host = window.location.protocol + '//' +window.location.host+'/';
var pathArray = window.location.pathname.split('/');
var baseUrl = host + pathArray.slice(1,pathArray.length-1).join('/');
console.log(baseUrl)
var host = window.location.protocol + '//' +window.location.host+'/';
var pathArray = window.location.pathname.split('/');
var baseUrl = host + pathArray.slice(1,pathArray.length-1).join('/');
console.log(baseUrl)
本文标题:获取当前页面的路径path
本文链接:https://www.haomeiwen.com/subject/vnmwpctx.html
网友评论