在Page2.htm中
<script>
function window.onbeforeunload()
{
    for(iIndex=0;iIndex<document.all.length;iIndex++)
    {
        var vObject=opener.document.element(document.all(iIndex).tagName);
        vObject.type="hidden";
        vObject.value=document.all(iIndex).value;
        opener.document.appendChild(vObject);
    }
}
大概就这样了.

解决方案 »

  1.   

    页面2如何识别页面1呢?
    运行提示:opener.document为NULL或不存在
      

  2.   

    页面2必须和页面1存在某种关系。
    这里页面2是由页面1中window.open打开的
      

  3.   

    成功了!!谢谢大家        function unload()
            {   var vObject ;
                alert(document.frm.length);
                for(iIndex=0;iIndex<document.frm.length;iIndex++)
                {    
                    vObject = opener.document.createElement("<input>");
                    vObject.name  = document.frm(iIndex).name;
                    alert(vObject.name);
                    //vObject.type  = "hidden";
                    vObject.type  = "text";
                    vObject.value = document.frm(iIndex).value;
                    alert(vObject.value);
                    opener.document.body.appendChild(vObject);
                }
            }
      

  4.   

    但IE里可以,用Netscape里却不行,谁知道怎么办????????????