不用传,在打开的窗口里,直接写
opener.主框口的倥件名称.value,
就可以引用主窗口里的数据

解决方案 »

  1.   

    1.url
    t=123
    window.open("a.asp?t="+t)2.object
    <script1>
    win=window.open("about:<input type=button onclick=alert(window.t)>")
    win.t=123
    </script>3.opener
    <script>
    t=123
    win=window.open("about:<input type=button onclick=alert(opener.t)>")
    </script>
      

  2.   


    <script>
    window.open("toquery.htm?age=18");
    </script>toquery.htm:
    ------------
    <script>
    function toquery()
    {
      var tmpstr=unescape(window.location.toString());
      var tmp=tmpstr.indexOf('?')
      tmpstr=tmpstr.substring(tmp+1,tmpstr.length);
      var strs=tmpstr.split('&');
      for (var i=0;i<strs.length;i++) eval(strs[i]+";");
    }
    toquery();
    alert(age);
    </script>
    总之就是通过window.location来传递,至于怎样处理这个字符串,就看你怎样的了,我上边的处理过于纰漏。