弹出一个窗口,然后刷新原来页面,同时要关系弹出窗口,有这个的代码吗? 
例如:a.aspx为原来页面
b.aspx为弹出页面要求从b.aspx中取得数据,传递给a.aspx并刷新a.aspx,关闭b.aspx 

解决方案 »

  1.   

    window.opener  或者 window.parent 就可以引用父窗口
    然后传参,刷新操作和操作本窗口一样。===============================
    http://qqwwee.com/csdn.rar
    CSDN小助手
      

  2.   

    看完本文,应该就可以解决了!
    ......................................................................
    http://www.microsoft.com/china/msdn/library/webservices/asp.net/WorkwithClientSideScript.mspx
      

  3.   

    a.aspxfunction OpenWindowB(){
       var s =window.showModalDialog("B.aspx",window ,"");
       if(s!=null){ //返回值
             document.location.replace(document.location.href);//刷新  
       }
    }b.aspx;
    window.onunload(){
        returnValue ="返回值";
    }欢迎大家加入技术中国 .NET技术区
      

  4.   

    <script>window.parent.location.href;window.close();</script>
      

  5.   

    我以前做弹出日历选择组件时碰到这个问题,用ShowModelDialog解决的,楼主可以看看http://www.cnblogs.com/Zeus/archive/2005/04/15/138553.html
    P.S.:不是广告:)
      

  6.   

    a.aspx不用刷新
    在b.aspx里直接传值应该行吧
    如:
    Response.Write("<script>window.opener.document.myform.txt_test.value ='"+values+"';window.close();");
      

  7.   

    a.aspx:<script language="javascript">
    function aWin()
    {
    var obj = new Object(); // obj为aspx传入b.aspx的数据
    obj.pro = "自定义一个属性";
    var w = window.showModalDialog("b.aspx",obj,"dialogTop=200px;dialogLeft=250px;DialogHeight=300px;DialogWidth=450px;resizable=no;help=no;status=no;");
    //w就是从b.aspx取得的数据
    alert(w);
    window.location.href = window.location.href;
    }
    </script>
    b.aspx:<script language="javascript">
    function bWin()
    {
    var obj2 = window.dialogArguments; //obj2就是a.aspx传入的参数
    alert(obj2.pro);
    //相关操作
    window.returnValue = "这是一个从b.aspx返回的值";
    window.opener = null;
    window.close();
    }
    </script>
      

  8.   

    a 页面
    var s =window.showModalDialog("b.aspx",window ,"");
       if(s!=null){ //返回值
             document.location.replace(document.location.href);//刷新  
       }b页面
    if(!IsClientScriptBlockRegistered ("ClientScript"))
    {
    string strScript="<script language='javascript'>";
    strScript+="window.parent.returnValue='"+strDetailSearch+"';";
    strScript+="window.parent.close();";
    strScript+="</script>";
    Page.RegisterClientScriptBlock("ClientScript",strScript);
    }
    window.location.reload();
      

  9.   

    window.close();window.opener.location.href=window.opener.location.href;
      

  10.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=49ML4AO8-5PB3-4KNY-NJZD-LJOIOXV4M1X4