转载出处:http://blog.csdn.net/qq20004604
location 对象
属性列表(chrome)
假如是这样的url:https://www.baidu.com/?key1=a&key2=b#abc
其属性为:
.ancestorOrigins:DOMStringList
.assign:()
.hash:"#abc"
.host:"www.baidu.com"
.hostname:"www.baidu.com"
.href:"https://www.baidu.com/?key1=a&key2=b#abc"
.origin:"https://www.baidu.com"
.pathname:"/"
.port:""
.protocol:"https:"
.reload:reload()
.replace:()
.search:"?key1=a&key2=b"
.toString:toString()
.valueOf:valueOf()
._proto_:Location