关于模态窗口(showModalDialog)的专题讨论!
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¶2=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">
5.
window.showModalDialog('FixedReport/CustomArea.aspx','','resizable:yes;scroll:yes;status:no;dialogWidth=900px;dialogHeight=650px;dialogTop:260px;dialogLeft:280px;center=yes;help=no');