读书人

iframe嵌套父页面访问子页的步骤

发布时间: 2012-11-21 08:23:26 作者: rapoo

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

<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>

读书人网 >Web前端

热点推荐