☀【window.self / window.parent / window.top】
Js中的window.parent ,window.top,window.self 详解 √
http://blog.csdn.net/zdwzzu2006/article/details/6047632
http://xxx/test1.html(同域)
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<iframe src="test2.html"></iframe>
<script>
console.log(top === self)
console.log(self === window)
console.log(self)
console.log(parent)
console.log(top)
</script>
</body>
</html>
test2.html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script>
console.log(top === self)
console.log(self === window)
console.log(self)
console.log(parent)
console.log(top)
</script>
</body>
</html>
☀【window.self / window.parent / window.top】的更多相关文章
- 【转】Js中的window.parent ,window.top,window.self 详解
[转自]http://blog.csdn.net/zdwzzu2006/article/details/6047632 在应用有frameset或者iframe的页面时,parent是父窗口,top是 ...
- 关于 window.parent, window.top, window.self 详解
在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口,opener是用open方法打 ...
- Javascript 中的window.parent ,window.top,window.self 详解
在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法 ...
- Js中的window.parent ,window.top,window.self 详解
在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法 ...
- JS中iframe相关的window.self,window.parent,window.top
window.self指的是当前窗口:他等价于window,self,window.self window.top指的是最顶层的窗口(有些页面可能会嵌套好几个iframe)如果只有一个窗口,那么就返回 ...
- window.parent ,window.top,window.self 详解
在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法 ...
- Js中的window.parent ,window.top,window.self ,window.openner详解
在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法 ...
- Js中的window.parent ,window.top,window.self详解
在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法 ...
- window.parent ,window.top,window.self 详解及parent和opener的区别
window.parent ,window.top,window.self 详解 在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层fr ...
随机推荐
- leetcode Permutations II 无重全排列
作者:jostree 转载请注明出处 http://www.cnblogs.com/jostree/p/4051169.html 题目链接:leetcode Permutations II 无重全排 ...
- javascript中的sort()方法
现在在学习javascript中,发现sort()函数是有点奇怪的东西(可能是本人水平的问题-_-!),于是就在这里记录一下自己找到的东西吧.sort()这个方法的参数很奇怪,必须是函数,但也是可选参 ...
- Android开发系列之调用WebService
我在学习Android开发过程中遇到的第一个疑问就是Android客户端是怎么跟服务器数据库进行交互的呢?这个问题是我当初初次接触Android时所困扰我的一个很大的问题,直到几年前的一天,我突然想到 ...
- 【python】迭代一列 斐波那契数列
def fabm(n): if n < 1: print('输入不能小于1') return -1 if n == 1 or n == 2: return 1 else: return fabm ...
- hdu 1358 period KMP入门
Period 题意:一个长为N (2 <= N <= 1 000 000) 的字符串,问前缀串长度为k(k > 1)是否是一个周期串,即k = A...A;若是则按k从小到大的顺序输 ...
- 【Git 】$ ./gradlew idea 构建一个idea的项目
Welcome to Git (version 1.9.5-preview20150319) Run 'git help git' to display the help index.Run 'git ...
- 蓝桥杯——FJ字符串
FJ在沙盘上写了这样一些字符串: A1 = "A"1 A2 = "ABA"3 A3 = "ABACABA"7 A4 = "ABAC ...
- C++编写操作系统(1):基于 EFI 的 Bootloader
很久以前就对操作系统很好奇,用了这么多年Windows,对他的运作机理也不是很清楚,所以一直想自己动手写一个,研究一下操作系统究竟是怎么实现的.后来在网上也找到过一些教程(比如:<自己动手写操作 ...
- java随机生成字符串并排序
package com.Imooc; import java.util.ArrayList; import java.util.Collections; import java.util.List; ...
- Java Web 前端高性能优化(一)
Web 发展的速度让许多人叹为观止,层出不穷的组件.技术,只需要合理的组合.恰当的设置,就可以让 Web 程序性能不断飞跃.所有 Web 的思想都是通用的,它们也可以运用到 Java Web.这一系列 ...