能把数据post给父窗口吗?然后本窗口关闭

解决方案 »

  1.   

    window.parent或者是window.opener(window.open方法打开的窗口)获取的是父级窗口的window对象
      

  2.   

    能举个例子吗?fu.php
    <?php
    echo "<input type='input' name='count' value='".$_POST['count']."'></td>";
    ?>
    <input  type="button" name="button" value="子窗口" onclick='window.open("1.html","name1","width=100,height=200,toolbar=no,scrollbars=no,menubar=no,screenX=100,screenY=100"); '>1.html
    <form method="post" action="fu.php" name="form1">
    <input type='input' name='count' >
    <input  type="submit" name="Submit" value="保  存" /> 
    </form>
      

  3.   

    直接调用父窗口JS 变量,直接复制不就可以了,opener.变量名 = “”;
      

  4.   


    他提示我 opener.document 为空或不是对象。。
      

  5.   

    var hdc=window.open('a.html')
    document.form1.txtname.value=hdc;a.html中
    function a(user)
    {
    parent.window.returnValue=user;
    }
      

  6.   

    http://topic.csdn.net/u/20091112/09/342769c1-0abf-4f92-8699-7ac7d462e0cf.html