http://community.csdn.net/Expert/topic/4545/4545043.xml?temp=.9576227

解决方案 »

  1.   

    file1
    ============================
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head>
    <body> 
    <form name="form1">
    <input type="text" name="filename" />
    </form>
    <iframe src="file2.htm"></iframe>
    </body>
    </html>
    file2
    ======================
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head><body>
    <script>
    window.parent.document.form1.filename.value="here is the filename";
    </script>
    </body>
    </html>
      

  2.   

    访问上级窗口的方法: parent    opener   top