弹出子窗口 关闭新窗口刷新父窗口
2012-08-04 11:03
218 查看
父窗口
<script type="text/javascript">
function OpenWin(url)
{
// var link=obj.srclink;
var height=parseInt(GetHeight()-30-250)/2;
var width=parseInt(GetWidth()-10-350)/2;
window.open(url,"","height=550, width=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no, left="+width+" , top="+height);
}
function GetHeight()
{
return window.screen.height;
}
function GetWidth()
{
return window.screen.width;
}
</script>
命令按纽
string url = "sfcljbxx.aspx?CLID=" + sLabel_CLID + "&ID=" + empno + "";
Page.ClientScript.RegisterStartupScript(typeof(Page), "", "<script>OpenWin('" + url + "');</script>");//字符
子窗口
命令按纽
this.Response.Write("<script>window.opener.location.replace(window.opener.document.referrer);window.close();</script>");//关闭刷新父窗口
// Page.ClientScript.RegisterStartupScript(typeof(Page), "", "<script>this.window.close();</script>");//关闭不刷新父窗口
<script type="text/javascript">
function OpenWin(url)
{
// var link=obj.srclink;
var height=parseInt(GetHeight()-30-250)/2;
var width=parseInt(GetWidth()-10-350)/2;
window.open(url,"","height=550, width=350, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no, left="+width+" , top="+height);
}
function GetHeight()
{
return window.screen.height;
}
function GetWidth()
{
return window.screen.width;
}
</script>
命令按纽
string url = "sfcljbxx.aspx?CLID=" + sLabel_CLID + "&ID=" + empno + "";
Page.ClientScript.RegisterStartupScript(typeof(Page), "", "<script>OpenWin('" + url + "');</script>");//字符
子窗口
命令按纽
this.Response.Write("<script>window.opener.location.replace(window.opener.document.referrer);window.close();</script>");//关闭刷新父窗口
// Page.ClientScript.RegisterStartupScript(typeof(Page), "", "<script>this.window.close();</script>");//关闭不刷新父窗口
相关文章推荐
- 关闭模态窗口后刷新父窗口
- window.showModalDialog 弹出窗口,关闭子窗,刷新父窗,在 .CS 中的实现
- firefox弹出窗口关闭时执行代码--刷新父窗口
- 如何用window.showModalDialog打开弹出子窗口,并在子窗口关闭时刷新父窗口
- 关闭弹出窗口后刷新背后的列表
- js如何关闭当前页,而不弹出提示框 尤其是万恶的IE||关闭子窗口同时刷新父窗口
- 弹出dialog 窗口; 以及在dialog 中关闭并且刷新父窗体的方法
- 弹出窗口保存数据后关闭父页刷新提示的办法
- 页面弹出模态窗口showModelDialog,关闭窗口刷新父页面
- 解决JavaScript页面刷新 与 弹出窗口问题 无提示关闭窗口
- 如何刷新弹出窗口父窗口,关闭弹出窗口
- javascript关闭弹出窗口时刷新父窗口和居中显示弹出窗
- 子窗口保存修改并关闭,同时刷新父窗口
- 已经可的窗体不能显示为模式对话框,关闭弹出修改窗口后主窗口DATAGRIDVIEW的刷新
- 弹出层并屏蔽父窗口(防刷新、后退、关闭窗口)
- layer 弹出层在提交后关闭,然后刷新父窗口
- javascript用window.open的子窗口关闭自己并且刷新父窗口
- javascript用window.open的子窗口关闭自己并且刷新父窗口
- Asp.net关闭弹出窗口刷新父窗口
- 弹出模态窗口,关闭并刷新页面