父窗体获取iframe window.iframeId iframe获取父窗口 window.parent parent.html 复制代码 代码如下: Insert title here <BR>function btnFn(){ <BR>window.subWin.test(); <BR>} <BR>function get(name){ <BR>return document.getElementById(name); <BR>} <BR> name="subWin" width="100%" marginwidth="0" height="100%" marginheight="0" scrolling="Yes" frameborder="0" valign="middle" resize="no" style="display: block;border:3px solid red;"> sub.html 复制代码 代码如下: Insert title here <BR>function test(){ <BR>alert(window.parent.get("name").value);//结果:222 <BR>} <br><br> 我是窗体的内容