RTThanks//

解决方案 »

  1.   

    session cookie and so on
      

  2.   

    window.opener.document.getElementById("textbox1").value="";
    window.opener.document.getElementById("button1").Clcick();
      

  3.   


    可以详细点吗....在A页面怎么接收textbo1的值.?
      

  4.   

    直接使用session 传值 
    不就行了
      

  5.   

    a.htm:<script>
    function OpenWin()
    {
       window.open("b.htm");
    }
    function checkForm()
    {
      alert("点了A页面的button");
      return true;
    }
    </script>
    <form name="form1" onsubmit="return checkForm();">
    <input type="button" value="打开新页面" onclick="OpenWin();">
    <input type="text" value="" id="tb" name="tb">
    <input type="submit" value="要执行的BUTTON" id="btn" name="btn"></form>b.htm:<script>
    function TranValue()
    {
       window.opener.document.getElementById("tb").value=document.getElementById("tb1").value; 
       window.opener.document.getElementById("btn").click();
       window.close();
    }
    </script>
    <input type="button" value="传值回A页面并执行A的CLICK事件" onclick="TranValue();">
    <input type="text" value="123123123123" id="tb1" name="tb1">
      

  6.   

    a.aspx
    var url = "a.aspx?Id=" + id;
    var mwidth = "400";
    var mheight = "330";
    var loc_x, loc_y;
    loc_x = parseInt((document.body.clientWidth - mwidth) / 2) + 200;
    loc_y = parseInt((document.body.clientHeight - mheight) / 2);
    window.open(url, "", "left=" + loc_x + "px,top=" + loc_y + "px,width=" + mwidth + "px,height=" + mheight + "px,resizable=no,scrollbars=yes,status=0");
    function A()
    {
    _dopostback('','');
    }
    b.aspx
    window.opener.document.getElementById("").value="";
    window.opener.A();
      

  7.   

    window.opener.document.getElementById("textbox1").value=""; 
    window.opener.document.getElementById("button1").clcick();window.opener指的是打开本页面的页面,也就是你的A页面
    window.opener.document.getElementById("textbox1")获取A页面ID为textbox1的文本框
    window.opener.document.getElementById("textbox1").value=""; 将A页面文本框的值设置为空,你可以设置成你要想的值
    window.opener.document.getElementById("button1")获取A页面ID为button1的按钮
    window.opener.document.getElementById("button1").clcick();触发A页面的按钮的单击事件
      

  8.   

    用Session传值可以,但不会改变A页面文本框中的值
      

  9.   

    js完全是可以实现的:
    父窗口:
       <script language="javascript" type="text/javascript">
    // <!CDATA[
            window.open("_TimeSpan.aspx");
            var v;
            function Button1_onclick() {
                alert(v);     
            }// ]]>
        </script>子窗口:
        <input id="Text1" type="text" value="123" onfocus="Do()" />
       function Do() {
            if (window.opener != null) {
                window.opener.v = document.getElementById("Text1").value;
                window.opener.document.getElementById("Button1").click();
            } 
        }