window.location 对象
Location 接口表示其链接到的对象的位置(URL)。
所做的修改反映在与之相关的对象上。
Document 和 Window 接口都有这样一个链接的Location,
分别通过 Document.location和Window.location 访问。
href: "http://127.0.0.1:5500/studys_start/day011-5-25/1.html?uname=123#main"
origin: "http://127.0.0.1:5500"
pathname: "/studys_start/day011-5-25/1.html"protocol: "http:"
host: "127.0.0.1:5500"hostname: "127.0.0.1"
port: "5500"search: "?uname=123"
hash: "#main"ancestorOrigins: DOMStringList {length: 0}
assign()
//加载给定URL的内容资源到这个Location对象所关联的对象上。reload(boolean)
// 重新加载来自当前 URL的资源。
//为true时 ,从服务器上加载数据。
//false或没有制定这个参数,浏览器可能从缓存当中加载页面。replace()
// 用给定的URL替换掉当前的资源。
//不会被保存在会话的历史 History中,这意味着用户将不能用后退按钮转到该页面。