如何调用子窗口的函数
a.aspx 代码:
<html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>主页面</title> <script type ="text/javascript" language ="javascript" > function callfun() { //调用子窗口函数showmsg(); } </script></head><body> <form id="form1" runat="server"> <div> <input id="Button1" type="button" value="call subfrm" onclick ="callfun()" /> <iframe id="subfrm" src="b.aspx"></iframe> </div> </form></body></html><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>子页面</title> <script type ="text/javascript" language ="javascript" > function showmsg() { alert("call by mainfrm!"); } </script></head><body> <form id="form1" runat="server"> <div> </div> </form></body></html>