no, use window.returnValue:var ret = showModalDialog("a.aspx");a.aspx:
<script language="javascript">
function window.onunload()
{
   window.returnValue = "123";
}
</script>

解决方案 »

  1.   

    use an array, for examplefunction window.onunload()
    {
       window.returnValue = new Array("123","abc","def");
    }
      

  2.   

    1.模态窗口的打开
    2.模态窗口的关闭
    3.模态窗口的传递参数。
    4.其他。
    1.window.showModalDialog("DialogPage.aspx","newwin","dialogHeight: 200px; dialogWidth: 150px; dialogTop: 458px; dialogLeft: 166px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: Yes;");2.window.close();3.传值
    ParentPage.aspx:
    window.showModalDialog("DialogPage.aspx?para1=aaa&para2=bbb");DialogPage.aspx:
    string str1=Request.QueryString["para1"].toString();
    string str2=Request.QueryString["para2"].toString();返回值
    DialogPage.aspx:
    window.returnValue="aaa";ParentPage.aspx:
    var str=window.showModalDialog("DialogPage.aspx");4.
    aspx页面在showmodeldialog情况下为什么一提交就重新打开一个页面?
    showmodaldialog打开的页面中在<head></head>之间加入一行:<base target="_self">
      

  3.   

    http://www.csdn.net/Develop/read_article.asp?id=15113