top.location.href和localtion.href有什么不同
2013-12-10 19:22
288 查看
top表示最顶级的窗口,也就是最外层的窗口。如果一个大窗口中嵌套了几个小窗口,那么在小窗口中使用top就表示最外面的大窗口
top.location.href=”url” 在顶层页面打开url(跳出框架)
self.location.href=”url” 仅在本页面打开url地址
parent.location.href=”url” 在父窗口打开Url地址
this.location.href=”url” 用法和self的用法一致
if (top.location == self.location) 判断当前location 是否为顶层来
禁止frame引用
如果页面当中有自定义的frame的话,也可以将parent self top换为自定义frame的名称 效果就是在自定义frame窗口打开url地址
top表示最顶级的窗口,也就是最外层的窗口。如果一个大窗口中嵌套了几个小窗口,那么在小窗口中使用top就表示最外面的大窗口
top.location.href=”url” 在顶层页面打开url(跳出框架)
self.location.href=”url” 仅在本页面打开url地址
parent.location.href=”url” 在父窗口打开Url地址
this.location.href=”url” 用法和self的用法一致
if (top.location == self.location) 判断当前location 是否为顶层来
禁止frame引用
如果页面当中有自定义的frame的话,也可以将parent self top换为自定义frame的名称 效果就是在自定义frame窗口打开url地址
相关文章推荐
- top.location.href和localtion.href有什么不同
- top.location.href和localtion.href有什么不同
- top.location.href和localtion.href有什么不同
- 转 top.location.href和localtion.href有什么不同
- top.location.href和localtion.href有什么不同
- top.location.href和localtion.href有什么不同
- top.location.href和localtion.href有什么不同
- top.location.href和localtion.href有什么不同
- top.location.href和localtion.href有什么不同
- 请问在javascript中top.location.href 与 location.href的区别是什么
- 【转】top.location. 4000 href和localtion.href有什么不同
- js问题 window.location.hash和window.location.href有什么不同
- javascript中top.location.href 与 location.href的区别是什么
- location href、parent location href、top location href、window open实现页面跳转
- top.location.href 没有权限 解决方法
- 关于js中"window.location.href"、"location.href"、"parent.location.href"、"top.location.href"的用法
- js中window.location.href,location.href,parent.location.href,top.location.href的用法
- location.href、parent.location.href、top.location.href、 window.open
- 关于js中"window.location.href"、"location.href"、"parent.location.href"、"top.location.href"的用法
- 关于js中window.location.href,location.href,parent.location.href,top.location.href的用法