☀【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 ...
随机推荐
- OpenJudge 2773 2726 2727 采药
1.链接地址: http://bailian.openjudge.cn/practice/2773/ http://bailian.openjudge.cn/practice/2726/ http:/ ...
- CentOS7 安装LAMP环境
1.使用yum安装 yum -y install httpd mysql mysql-server php php-mysql postgresql postgresql-server php-pos ...
- 通过正则表达式获取url中参数
url: http://xxxx.com?name=魅力&id=123 js中: var name = getUrlParam("name"); /*通过正则获取url中的 ...
- win7 蛋疼的时间格式转化
win7系统 获得系统时间为 2015年1月1日 星期5 10:10 数据库中时间格式 是不认识的 转化为 DateTime.Now.ToString("yyyy-MM-dd HH:mm:s ...
- 转.....IOC 和DI
引述:IoC(控制反转:Inverse of Control)是Spring容器的内核,AOP.声明式事务等功能在此基础上开花结果.但是IoC这个重要的概念却比较晦涩隐讳,不容易让人望文生义,这不能不 ...
- python制作安装包(setup.py)
1.制作setup.py from distutils.core import setup setup(name='Myblog', version='1.0', description='My Bl ...
- hdu 5646 DZY Loves Partition 二分+数学分析+递推
链接:http://acm.hdu.edu.cn/showproblem.php?pid=5646 题意:将n分成k个正整数之和,要求k个数全部相同:并且这k个数的乘积最大为多少?结果mod 1e^9 ...
- 学习hash_map从而了解如何写stl里面的hash函数和equal或者compare函数
---恢复内容开始--- 看到同事用unordered_map了所以找个帖子学习学习 http://blog.sina.com.cn/s/blog_4c98b9600100audq.html (一)为 ...
- CoreBluetooth - 中心模式
BLE中心模式流程-coding BLE中心模式流程 - 1.建立中心角色 - 2.扫描外设(Discover Peripheral) - 3.连接外设(Connect Peripheral) - 4 ...
- Ajax简单实现文件异步上传的多种方法
1. 认识FormData对象 FormData是Html5新加进来的一个类,可以模拟表单数据 构造函数 FormData (optional HTMLFormElement form) (可选) 解 ...