具体该怎么做~?能详细点吗~?因为我是刚刚学PHP的~~

解决方案 »

  1.   

    如果使用window.open打开窗口
    可以用window.opener给父窗口元素赋值.参考参考....
      

  2.   

    //parent.html
    <html>
    <head>
    <title>abc</title>
    </head>
    <script>
    function openWindow()
    {
    window.open('yyy.html','',"top=150,left=200,height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
    }
    </script>
    <body>
    <input type="button" name="button1" value="button1" onclick="openWindow();">
    <input type="text" name="text1" id="text1">
    </body>
    </html>//yyy.html
    <HTML>
    <HEAD>
    <TITLE>yyy</TITLE>
    <script>
    function send()
    {
    var cbx = document.getElementsByName('cbx');
    for (var i=0 , l = cbx.length; i < l ;i++ )
    {
    if (cbx[i].checked == true)
    {
    window.opener.document.getElementById('text1').value += cbx[i].value;
    }
    }
    }
    </script>
    </HEAD><BODY>
    <input type="checkbox" name="cbx" value="1">1
    <input type="checkbox" name="cbx" value="2">2
    <input type="checkbox" name="cbx" value="3">3
    <input type="button" value="click me" onclick="send();" />
    </BODY>
    </HTML>
      

  3.   

    parent.returnarray = new Array();
    for(i=0,i<fi.length,i++)
    {
    if(f1[i].checked){
     parent.returnarray.push(f1[i]);
     alert (f1[i]);//这个是可以执行的,我在网吧,具体的代码不记得了
     }
    window.close(); 
    }在父窗口用returnarray就行了。