建立一个如下的关系框架

windowA.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>windowA</title>
</head>
<frameset rows="160,*">
<frame src="frame.html" name="topFrame">
<frameset cols="50%,50%">
<frame src="aframe.html" name="leftFrame">
<frame src="bframe.html" name="rightFrame">
</frameset> </frameset> </html>

aframe.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h4>this is aframe.html</h4>
<script type="text/javascript">
function sayleft() {
console.log("frameA from....");
}
var age=44;
console.log(window.age)
//sayleft()
</script> </body>
</html>

bframe.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h4>this is aframe.html</h4>
<script type="text/javascript">
function sayleft() {
console.log("frameA from....");
}
var age=44;
console.log(window.age)
//sayleft()
</script> </body>
</html>

cframe.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h4>this is aframe.html</h4>
<script type="text/javascript">
function sayleft() {
console.log("frameA from....");
}
var age=44;
console.log(window.age)
//sayleft()
</script> </body>
</html>

frame.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h3>this is frame.html</h3>
<script type="text/javascript">
function sayHi() {
console.log("frameTop");
}
var age=33;
console.log(window.age)
sayHi()
</script> </body>
</html>

    console.log("调用window.opener.parent.leftFrame.sayHi()方法");
window.opener.parent.frames["leftFrame"].sayleft();
console.log(window.opener);
console.log(window.opener.parent.frames["topFrame"].age);
window.parent.leftFrame.sayleft();

跳转的页面cframe.html,通过window.opener找到原页面window属性,在通过.parent找到frame.通过frame.函数名来调用函数

重要说的是: open一个窗口,这个窗口就是独立的window了 和 其他窗口之间就没关系了,唯一的联系就是window.opener属性

frame window 和open 的关系的更多相关文章

  1. 动态加载Layout 与 论Activity、 Window、View的关系

    1)动态加载Layout的代码是 getWindow().setContentView(LayoutInflater.from(this).inflate(R.layout.main, null)); ...

  2. 图解:window与BOM的关系

    window与BOM的关系: 1.https://www.jianshu.com/p/f5409202a835

  3. android 中的 window,view,activity具体关系

    通过讨论这个问题,我们能够见识到google是对面向对象模式的理解,能够理解android底层的一些调用.这也是一道很常见的面试题. 我们这篇文章就来解决这四个问题: Android  中view的显 ...

  4. 动态载入Layout 与 论Activity、 Window、View的关系

    1)动态载入Layout的代码是 getWindow().setContentView(LayoutInflater.from(this).inflate(R.layout.main, null)); ...

  5. DirectFB、Layer、Window、Surface之间关系

    层(Layers) 表示一块儿独立的图像缓冲区.大多数的嵌入式设备都有多个层.他们由硬件使用合适的alpha值来blending,然后显示. 表面 (Surface) 用来保存像素数据的保留内存区域. ...

  6. UIView 中 frame, bounds, center 属性的关系

    最近一直在学 iOS 开发,所以专门创建了这样一个类别,将自己学习中的一些问题整理,记录下来.由于自己是初学者,所以所写的文章非常基础,写这个类别一是为了给自己留下存 档,二是为了给和我有同样问题的初 ...

  7. android分析windowManager、window、viewGroup之间关系(一)

    本文将主要介绍addview方法,在windowManager.window.viewGroup中的实现原理.首先将介绍这些类结构关系,然后分析其内在联系,介绍实现原理,最后介绍重要的一个参数wind ...

  8. activity 、window与view的关系(下)

    在activity的attacth方法中,通过policymanager 的makenewwindow来创建window 而window的具体实现是phonewindow 接下来通过setconten ...

  9. activity 、window与view的关系 (上)

    我在研究任玉刚老师的<android开发艺术探索>的关于windowmanager那一章时,我发现自己对于acitivity.window和view之间的概念还是比较模糊. 然后查了一下a ...

随机推荐

  1. 【vim】常用总结

    简介 什么是vim? Linux下两大编辑神器之一 vim Linux/Unix下使用最多的编辑器 vi的改进版 可能是最难上手的编辑器之一 为什么要学习vim? 都21世纪了,为什么还需要学习vim ...

  2. Webflux请求处理流程

    spring mvc处理流程 在了解SpringMvc的请求流程源码之后,理解WebFlux就容易的多,毕竟WebFlux处理流程是模仿Servlet另起炉灶的. 下面是spring mvc的请求处理 ...

  3. NOIP模拟测试16「Drink·blue·weed」

    话说这次考试 Drink 非常棒的一道卡常练习题,适合练习卡常 真的很棒 前置卡常知识 1.char要比int快 char是最快的 输出putchar,输入getchar 在这个题快了7000豪 2. ...

  4. vue调用子组件方法时,参数传不过去

    有可能是因为子组件方法用了 async  await 子组件去掉async就好了

  5. 服务器硬件及RAID配置实战

    一.RAID磁盘阵列介绍 二.阵列卡介绍 三.阵列卡的缓存 四.实验构建软RAID磁盘阵列 一.RAID磁盘阵列介绍 1.定义 是Redundant Array of Independent Disk ...

  6. 七、JavaSE语言基础之方法

    关于方法的几个简单概念 关于方法的学习,先来明确几个简单的概念: 方法的作用:处理数据(把原始数据通过指定的算法处理后得到结果数据) 方法:在类中定义的具有特定功能的代码块 方法的意义(作用):提高代 ...

  7. Tiling 简单递推+大数

    Tiling c[0]=1,c[1]=1,c[2]=3;   c[n]=c[n-1]+c[n-2]*2;   0<=n<=250.   大数加法 java  time  :313ms 1 ...

  8. 谁知道百会CRM跟Zoho是一家公司吗?

    说到ZohoCRM,无论是搜索引擎还是信息网站,总会有无数的身影.很多人不知道这两家公司的关系,甚至认为百会和Zoho是一家公司.那么,百会CRM和Zoho属于同一类公司吗?它们之间有什么关系?今天小 ...

  9. ssm跨域解决

    最近挑战杯项目要交了,最后一个开发的项目,还是得好好对待,不知道会不会真香,昨天还是遇到了一些问题,尤其是对接的时候,用postman对接的时候,没有啥问题,结果前端上线对接时,发现ajax无法请求到 ...

  10. 关于vector.size()的一些常见错误总结

    1. 问题引入 通过查看[https://www.cplusplus.com/reference/vector/vector/] 的vector.size()说明,即 member type defi ...