location.href的⽤法location对象的定义和⽤法。
href 属性是⼀个可读可写的字符串,可设置或返回当前显⽰的⽂档的完整 url。语法就是  location.href。常⽤的⼏种⽅法。
在开发中⽤的⽐较多的⼏种形式,
① top.location.href="url"(在顶部页⾯打开url)
② self.location.href="url"(仅在本页⾯打开url)
③ window.location.href="url"(在当前页⾯打开url)
④ parent.location.href="url"(在⽗窗⼝打开url)
html href属性
⑤ location.href="url"(在当前页⾯打开url)