RT,用reload可以解决刷新,网上提供的CSS样式behavior:url(#default#savehistoru)可以保留表单,但是只能按F5和浏览器上的刷新按钮.如果用reload和CSS结合能刷新但不能保存表单,表单有点多,用session麻烦,求解决方案.最好是JS就能解决的.

解决方案 »

  1.   

    用cookie保存一下刷新后再读出来就好了
      

  2.   

    parent.htm
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>
    <head>
    <script>
    </script>
    </head>
    <BODY>
    <form method=post action='aaaaa.asp' name=frm>
    <input type=text id=a name=a ></form>
    <button onclick="javascript: window.open('child.htm','mychild');">打开子页面</button>
    </BODY></HTML>
    child.htm
    <script>
    function AlterParent(){
    alert(window.opener.document.frm.a.value)
      window.opener.document.frm.a.value="text被子页面无刷新更新"
    }
    </script>
    <body onbeforeunload='javascript:AlterParent()'>
    child
    </body>
      

  3.   

    给你简化一下
    child.htm
    <script>
    function AlterParent(){
      with (window.opener.document.frm){
        a.value="text被子页面无刷新更新"
        //.........
        //.........
      }
     
    }
    </script>
    <body onbeforeunload='javascript:AlterParent()'>
    child
    </body>你这个需求是管理系统开发中最经常用到的,以前我都这么处理。还有一个办法就是,你别打开新窗口,用div模拟
      

  4.   

    楼主这个问题我遇到过,其实有个很简单的方法
    第一、父页面的form 的 method="get" 也就是 <form action="" method="get"></form>
    第二、子页面关闭时,掉一下这个 window.opener.history.go(0);
    你试试 准行 
    记得给分
      

  5.   

    所有需要保留数据的东西全要放到 这个 form 里面