就是在你窗口单击按钮,打开一个小子窗口,在子窗口选择值后,关闭子窗口后在你窗口会马上显示出来!谢谢了!

解决方案 »

  1.   

    var value = showModalDialog("a.aspx", .......);
    if(value != null)
        document.getElementById("..").InnerText = value;
    a.aspx window.returnValue = "...";
     window.close();
      

  2.   

    var value = showModalDialog("a.aspx", '', 'dialogHeight: 650px; dialogWidth:1050px;center:yes;help:no;resizable:no;status:no;toolbar:no;');
    /*
    showModalDialog 是弹出模态对话框方法
    value  用于接收对话框返回的值
    a.aspx       对话框的 URL
    dialogHeight 对话框的高度
    dialogWidth  对话框的宽度
    center       是否居中显示
    resizable    页面大小是否可以更改
    status       是否显示状态栏
    toolbar      是否显示工具栏
    */
    if(value != null)   // 判断返回的值是否为空
        document.getElementById("ControlID").InnerText = value;
    // ControlID 为你想要显示的控件的ID
    // InnerText 该控件的显示文本
    a.aspx window.returnValue = "asdf";   // 设置对话框的返回值为 asdf
     window.close();                // 对话框关闭