function getRootPath(){ var curPageUrl = window.document.location.href; var rootPath = curPageUrl.split("//")[0] + curPageUrl.split("//")[1].split("/")[0] + "/" + curPageUrl.split("//")[1].split("/")[1]; return rootPath; }
HTML中获取项目根路径
猜你喜欢
转载自www.cnblogs.com/lideqiang0909/p/11138094.html
今日推荐
周排行