iframe嵌套父页面访问子页的方法

来源:互联网 发布:起名字软件下载 编辑:程序博客网 时间:2024/04/29 08:04

<html>
<head>
<script type="text/javascript">
 function show()
 {
  window.frames[0].Two(123);
 }
</script>
</head>
<body>
<input type="button" value="调用iframe里面的js" onclick="show();"/>
<iframe src="./test01.html"></iframe>
</body>
</html>

 

 

 

 

 

 

<html>
<head>
<script type="text/javascript">
function test(){

 window.open('','','fullscreen=1');
}
</script>
</head>
<body>
<input type="button" value="测试" onclick="test()">
ddd
</html>

 

 

 

 

 

 

 

原创粉丝点击