self.location.href;//当前页面打开URL页面window.location.href;//当前页面打开URL页面this.location.href;//当前页面打开URL页面location.href;// 当前页面打开URL页面parent.location.href;//在父页面打开新页面top.location.href;//在顶层页面打开新页面
上图,效果如下
如下四个当前页面打开url页面效果如下
self.location.href;//当前页面打开URL页面window.location.href;//当前页面打开URL页面this.location.href;//当前页面打开URL页面location.href;// 当前页面打开URL页面如下两个 效果如下:
parent.location.href;//在父页面打开新页面top.location.href;//在顶层页面打开新页面
这两个效果是有区别的,只是我这个最外面的页面就是上一层页面(父页面),所以这里效果是一样
"top.location.href"是最外层的页面跳转"parent.location.href"是上一层页面跳转.



被折叠的 条评论
为什么被折叠?



