试管移植冻胚成功率:如何在一个frame中调用另一个frame中的javascript函数?
来源:百度文库 编辑:神马品牌网 时间:2024/04/20 09:30:25
谢谢,要求全是客户端完成,不能到服务器返回
main.htm
<Iframe id="frame1" src="1.htm"; width="250" height="200" scrolling="no" frameborder="0"></iframe>
<Iframe id="frame2" src="2.htm"; width="250" height="200" scrolling="no" frameborder="0"></iframe>
--------------------------------------------
1.htm
<script language="javascript">
function test()
{
alert("测试")
}
</script>
---------------------------------------------
2.htm
<input type="button" onclick="parent.frame1.test()">