- window.location.search = "?name=cca&val=333" //参数
- window.location.href //获取完整路径
- window.location.hash //哈希值
- window.location.hostname //主机名
- window.location.port = 80 //端口
- window.location.pathname //路径
- window.location.protocol //协议
- window.location.assign("http://v.qq.com") 等价于
- window.location == window.location.href
来源: http://www.bubuko.com/infodetail-1978193.html