iframe父子窗口间JS方法调用
来源:互联网 发布:adams四连杆优化 编辑:程序博客网 时间:2024/06/11 06:15
1.父窗口页面parent.html
<head>
<script type="text/javascript">
function say(){
alert("parent.html------>I'matparent.html");
}
function callChild(){
myFrame.window.say(); //父窗口调用iframe子窗口方法myFrame为子窗口iframe的名称
}
</script>
</head>
<body>
<input type="button" value="调用child.html中的函数say()"onclick="callChild()">
<iframe name="myFrame" src="child.html"></iframe>
</body>
</html>
2.子窗口页面child.html
<html>
<head>
<script type="text/javascript">
function say(){
alert("child.html--->I'matchild.html");
}
function callParent(){
parent.say(); //iframe子窗口调用父窗口方法
}
</script>
</head>
<body>
<input type="button" value="调用parent.html中的say()函数" onclick="callParent()">
<head>
<script type="text/javascript">
function say(){
alert("child.html--->I'matchild.html");
}
function callParent(){
parent.say(); //iframe子窗口调用父窗口方法
}
</script>
</head>
<body>
<input type="button" value="调用parent.html中的say()函数" onclick="callParent()">
</body>
</html>
</html>
0 0
- iframe父子窗口间js方法调用
- iframe父子窗口间JS方法调用
- iframe父子窗口间JS方法调用
- Iframe嵌套 父子窗口互相调用方法
- iframe 父子窗口调用
- JS iframe父子页面元素调用方法
- iframe父子页面相互调用js方法
- iframe父子页面相互调用js方法
- JS iframe父子页面元素调用方法
- iframe自适应高度以及调用父子窗口的方法
- iframe 父子页面之间的js函数调用方法
- 在Iframe中调用父子页面的js方法
- iframe父子页面相互调用的js方法(二)
- iframe父子页面相互调用的js方法
- iframe父子窗口的相互调用
- iframe 父子窗口相互调用总结
- iframe中父子窗口的调用
- 父子页面间相互调用js方法
- 黑客(Hacker)的历史
- android之volley StringRequest null
- 婚庆公司加盟,经营有门道
- JSON学习(一)
- Python多线程学习
- iframe父子窗口间JS方法调用
- 改变实参
- Effective JavaScript Item 46 优先使用数组而不是Object类型来表示有顺序的集合
- linux文件的特殊权限
- android--手机桌面增加网址链接图标(解决方案二)
- 菜鸟学SSH(十九)——提高用户体验之404处理
- ios8中百度推送接收不到
- hdu 1324 Pseudo-Random Numbers
- JSON学习(二) - JavaScript处理JSON数据