something like:
<script language="JavaScript">
     opener.document.getElementById('name').value=document.getElementById('name1'); 
     window.open('','_top');
     window.top.close();
</script>

解决方案 »

  1.   

    首先这两个页必须有关系,比如楼上说的就属于弹出窗体:1.HTML弹出2.HTML,这样在2.HTML里就可以直接对父页面进行操作.
    再一个就是使用摸态窗体可以传递参数,也能获得操作的数据.Window.ShowModalDialog 你可以搜索一下,不过只对IE有效,火狐不支持.
    如果他们没有这样的关系就好象没办法在两个页面间进行操作!
      

  2.   

    http://topic.csdn.net/u/20080521/16/f1ea3d9b-502e-4cde-9d0a-afce32615a1a.html
    看下我的4楼回复。。参数传递
      

  3.   

    把值写入cookie
    然后2.html得到cookie中数值定时刷新页面就可以
    就是比较耗资源
      

  4.   

    另存为htm文件,以utf-8编码保存,就可以测试了<style>
    #calc{width:200px;height:200px;border:#ccc 1px solid;background:#efefef;position:absolute;}
    </style>
    <script>
    var $=document.getElementById;
    var controller = {
        resultInput:"",
        calculator:"",
        showInput:function(resultInput,calculator){
            if(calculator.style.display == "block") return;
            this.resultInput = resultInput;
            this.calculator  = calculator;
            calculator.style.display = "block";
        },
        applyResult:function(result){
            this.resultInput.value = result;
            this.calculator.style.display = "none";
        }
    }
    </script>
    <input type="text" id="txtNum" name="txtNum" readonly="true" onfocus="controller.showInput(this,$('calc'))" />
    <div id="calc" style="display:none;">
        <div class="inputNum"><input type="text" id="txtInput" name="txtInput"/></div>
        <div><a href="javascript:void(0)" onclick="controller.applyResult($('txtInput').value)">确认</a></div>
    </div>
      

  5.   

    将下面页面存放同一个文件夹下测试:a.html:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    </head><body>
    <input type="checkBox" id="name1" name="name" value="num1" onclick="pass(this)" >num1 <br> 
    <input type="checkBox" id="name2" name="name" value="num2" onclick="pass(this)" >num2 <br> 
    <input type="checkBox" id="name3" name="name" value="num3" onclick="pass(this)" >num3 <br> 
    <input type="checkBox" id="name4" name="name" value="num4" onclick="pass(this)" >num4 <br> 
    <input type="checkBox" id="name5" name="name" value="num5" onclick="pass(this)" >num5 <br> </body>
    </html>
    <script>
    function pass(o)
    {
    window.location.href='b.html?id=' + o.value

    </script>
    b.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    </head><body>
    <script>   
        
      var   str   =   window.location.search   
      if(str!="")   
      {   
      str   =   str.split("?")[1]   
      str   =   str.split(escape("&"))   
      for(var   i=   0;i<str.length;i++)   
      {   
      document.write("a页面的值:"+str[i].split("=")[1])   
      }   
      }   
        
      </script>
    </body>
    </html>
      

  6.   

    2.html弹出1.html。在2.html中有一个按钮,点击后显示1.html中的多选按钮,然后选中几个多选按钮就可以在2.html中显示出选中的几个多选按钮的值。