function getRealPath(){
   var curWwwPath = window.document.location.href;
   var pathName = window.document.location.pathname;
   var localhostPath=curWwwPath.substring(0, curWwwPath.indexOf(pathName));
   var projectName = pathName.substring(0,pathName.substr(1).indexOf('/')+1);
   return localhostPath + projectName;
}

 


用于html页面路径

相关文章:

  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
  • 2022-12-23
  • 2021-11-23
  • 2021-11-23
  • 2021-11-23
猜你喜欢
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-11-23
  • 2021-12-20
相关资源
相似解决方案