window.location对象的各个属性使用
hash,返回一个url的一个锚部分。返回一个 URL 的主要部分。假设当前的 URL 是 http://www.runoob.com/test.htm#PART2:输出#part2host,返回一个url的主机名和端口号。document.write(location.host);返回www.baidu.comhostname,返回主机名。document.write(location.hostname);返回www.baidu.comhref,返回完整的url,document.write(lo.







