retval = window.showModalDialog("../../../PublicPage/calendar.htm", "", "dialogWidth:197px; dialogHeight:210px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scrollbars:no;Resizable=no; "  ); document.all.txt.value = retval;如上得到小页面的返回值并将其赋给 txt 控件小页面如下返回一个值
window.returnValue = xxx;
window.close();

解决方案 »

  1.   

    public void refe(object sender,EventArgs e)
    {   
    Response.Write("<script>window.opener.Form1.testbox1.value='qq';window.close(); </script>");
    }
      

  2.   

    子窗口:
    opener.document.forms(id).value=XX
      

  3.   

    主窗口
    var a=window.showModalDialog("aspx","",...)
    if (a!=null){
    document.Form1.txt.value=a;
    }
    子窗口:
    window.returnValue = b;
    window.close();
      

  4.   

    following aduan1026(阿段) ( ).
      

  5.   

    关闭showModalDialog窗口时会弹出个和现在一样窗口,我在<head>加了<base target="_self">,我的机器是好的,可到了别的机器就出问题了