window.showModalDialog调用的页面也可以刷新页面!

此方法分三步:
1、在<body>标签内添加如下代码:

<object id="closes" type="application/x-oleobject" class="vis" visible="false" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="command" value="close" />
</object>

2、在<head>标签内添加如下代码:

<script language="javascript" type="text/jscript">
window.onunload=e;
function e(){
closes.click();
return;
window.close();
}
</script>


3、在后台的load事件中直接添加如下代码:

Response.Buffer = true;
Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
Response.Expires = 0;
Response.CacheControl = "no-cache";


最后在另一个页面调用该页面:
window.showModalDialog("XXXX.aspx",'',"dialogHeight:500px;dialogWidth:700px;center=yes;help=no;status=no");

你可能感兴趣的:(window.showModalDialog调用的页面也可以刷新页面!)