要用ModelWindow(具体的名字记不得了),这样可以传回数据.

解决方案 »

  1.   

    <a href="javascript:void(0)" onclick=window.open('sub.htm','','')>sub</a>
    <input type=text name=mytext>sub.htm
    <script>
    function myset(obj)
    {
    opener.document.all.mytext.value=obj.innerHTML;
    window.close();
    }
    </script>
    <div onclick=myset(this)>text1</div>
    <div onclick=myset(this)>text2</div>
    <div onclick=myset(this)>text3</div>
      

  2.   

    <script>parent.one.two.value="testtring"</script>
      

  3.   

    <input type=button onclick='mm()' value=open>
    <input name=txt1>
    <input type=button value=getDate onclick='nn()'>
    <script>
    var newWin;
    function mm()
    {
        newWin = window.showModalDialog("1.htm");
    }
    function nn()
    {
        txt1.value = newWin;  
    }
    </script>1.htm:
    <script>
    window.returnValue = "wssgwps";
    window.close();
    </script>