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】的更多相关文章

  1. 【转】Js中的window.parent ,window.top,window.self 详解

    [转自]http://blog.csdn.net/zdwzzu2006/article/details/6047632 在应用有frameset或者iframe的页面时,parent是父窗口,top是 ...

  2. 关于 window.parent, window.top, window.self 详解

    在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口,opener是用open方法打 ...

  3. Javascript 中的window.parent ,window.top,window.self 详解

    在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法 ...

  4. Js中的window.parent ,window.top,window.self 详解

    在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法 ...

  5. JS中iframe相关的window.self,window.parent,window.top

    window.self指的是当前窗口:他等价于window,self,window.self window.top指的是最顶层的窗口(有些页面可能会嵌套好几个iframe)如果只有一个窗口,那么就返回 ...

  6. window.parent ,window.top,window.self 详解

    在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法 ...

  7. Js中的window.parent ,window.top,window.self ,window.openner详解

    在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法 ...

  8. Js中的window.parent ,window.top,window.self详解

    在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层frameset或者iframe),self是当前窗口, opener是用open方法 ...

  9. window.parent ,window.top,window.self 详解及parent和opener的区别

    window.parent ,window.top,window.self 详解 在应用有frameset或者iframe的页面时,parent是父窗口,top是最顶级父窗口(有的窗口中套了好几层fr ...

随机推荐

  1. 超过130个你需要了解的vim命令

    基础 :e filename Open filename for edition :w Save file :q Exit Vim :q! Quit without saving :x Write f ...

  2. php验证身份证号码正确性

    发布:JB01   来源:脚本学堂     [大 中 小] 分享一例php代码,用于验证身份证号码的正确性,用到了preg_match.preg_replace函数,有需要的朋友可以参考学习下.本文转 ...

  3. Python设计模式——设计原则

    1.单一职责原则:每个类都只有一个职责,修改一个类的理由只有一个 2.开放-封闭远程(OCP):开放是指可拓展性好,封闭是指一旦一个类写好了,就尽量不要修改里面的代码,通过拓展(继承,重写等)来使旧的 ...

  4. 上传图片+浏览+裁切 Demo(无后台处理部分)

    <!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  5. Win8.1设置窗口背景颜色为护眼色

    更改注册表 window+R --->输入regedit(点击确定后进入注册表编辑器) 需要修改以下两个地方,重启电脑生效: [HKEY_CURRENT_USER\Control Panel\C ...

  6. Wix 安装部署(一)同MSBuild 自动生成打包文件 转

    原文地址:http://www.cnblogs.com/stoneniqiu/p/3355086.html 因为项目需要,最近在研究Wix打包部署,园子里也有一些关于wix的博客,方方面面,讲的点各不 ...

  7. delphi xe5 android 开发数据访问手机端 解决乱码的办法

    经过测试,将sqlserver里的字段由varchar 或者char  改为  nvarchar 或者nchar 然后在手机端的clientdataset 增加字段的时候数据类型选择widestrin ...

  8. sjtu1591 Count On Tree

    Description Crystal家有一棵树.树上有\(n\)个节点,编号由\(1\)到\(n\)(\(1\)号点是这棵树的根),两点之间距离为1当且仅当它们直接相连.每个点都有各自的权值,第\( ...

  9. jquery ashx

    http://www.cnblogs.com/wzcheng/archive/2010/05/20/1739810.html http://www.cnblogs.com/yyl8781697/arc ...

  10. Jmeter 执行java脚本结束时提示:he JVM should have exitted but did not

    使用jmeter执行java协议测试结束时会提示:he JVM should have exitted but did not ,jmeter2.11以后的可以 通过设置:      jmeteren ...