window.location对象 用于获得当前页面的地址 (URL),并把浏览器重定向到新的页面。返回的是对象
console.log( window.location )
window.location.href 获取路径字符串
console.log( window.location.href )
window.location.hash 返回的是链接后面#跟的内容
console.log( window.location.hash )
window.location.search 链接后面?跟的内容
console.log( window.location.search )