//获取域名
host = window.location.host;
host2=document.domain; 

//获取页面完整地址
url = window.location.href;

document.write("<br>host="+host)
document.write("<br>host2="+host2)
document.write("<br>url="+url)

 

总结 获取所有跟uri有关的 都在window.location属性中

相关文章:

  • 2022-12-23
  • 2021-10-21
  • 2021-06-15
  • 2021-10-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-07-18
  • 2022-01-10
  • 2022-02-15
相关资源
相似解决方案