同学 好像只用javascript是没法实现这个功能的

解决方案 »

  1.   

    a.html--------------<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title></title></head>
    <body><script language="JavaScript" type="text/JavaScript">function load(obj)
    {
    form1.t1.value=obj.a1;
    form1.t2.value=obj.a2;
    alert(form1.t1.value+form1.t2.value);
    }</script>
    <form name="form1" method="post" action="">
      <input type="text" name="t1" value="">
      <input type="text" name="t2" value="" >
      <input type="button" name="Submit" value="提交" onClick="window.open('b.html')">
    </form>
    </body>
    <html>
    b.html---------------------------
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title></title>
    <script language="JavaScript" type="text/JavaScript">
     function sendTo()
     {
      var obj=new Object
      obj.a1="a";
      obj.a2="b";  self.opener.load(obj);
      window.close()
     }
    </script>
    </head>
    <body>
      <input value="返回" type="button" name="button" onclick="sendTo()">
    <html>
    看看是不是你想要的。
      

  2.   

    a.htm文件中的按钮的type不能是submit,不然的话不就提交了,页面又刷新了,数据当然不能保留
      

  3.   

    <input type="text" name="t1" readonly="true" value=""/>
    这样文本框就不能直接编辑了
      

  4.   

    用模态打开窗口
    在b.html指定returnValue
    关闭时就可以返回了