首页 > Web开发 > 详细

js与uri中location关系

时间:2015-03-17 11:51:38      阅读:378      评论:0      收藏:0      [点我收藏+]

//获取域名
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属性中

js与uri中location关系

原文:http://www.cnblogs.com/jdhu/p/4343690.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!