当关闭子窗口时刷新父窗口
2005-11-29 12:59
288 查看
父窗口中有数据列表,当对数据进行修改时弹出一子窗口,对数据进行修改,完毕保存后,当关闭子窗口
时,刷新父窗口数据
<script language="javascript">
function closewin()
{
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) //检测窗口关闭事件
{
self.close();
window.opener.location.href=Form1.Hidden1.value; //不能用window.opener.location.reload(),否则会出提示框
}
}
</script>
<body bgColor="darkgray" MS_POSITIONING="GridLayout" onbeforeunload="closewin()";>
时,刷新父窗口数据
<script language="javascript">
function closewin()
{
if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) //检测窗口关闭事件
{
self.close();
window.opener.location.href=Form1.Hidden1.value; //不能用window.opener.location.reload(),否则会出提示框
}
}
</script>
<body bgColor="darkgray" MS_POSITIONING="GridLayout" onbeforeunload="closewin()";>
相关文章推荐
- 关闭子窗口 父窗口自动刷新
- 判断浏览器是刷新还是关闭窗口
- javascript弹出及关闭窗口及页面刷新问题总结。
- 如何在模式窗口关闭时刷新父窗口
- js如何关闭当前页,而不弹出提示框 尤其是万恶的IE||关闭子窗口同时刷新父窗口
- showModalDialog依次弹出两个模态窗口.两个窗口同时关闭并刷新父窗体
- 当关闭子窗口时刷新父窗口
- 关闭子窗口,刷新父窗口
- 弹出dialog 窗口; 以及在dialog 中关闭并且刷新父窗体的方法
- 关闭窗口刷新父页面
- 刷新窗口 关闭窗口
- javascript 控制窗口关闭并刷新另一页面
- javascript 刷新页面 关闭窗口
- 集中刷新父窗口,关闭子窗口的JS(后台)
- 如何使一个窗口关闭的同时另一个窗口刷新
- 弹出模态窗口,关闭并刷新页面
- 刷新或者关闭页面前弹出confirm窗口的实现
- JavaScript:关闭弹出窗口时刷新父窗口
- 浮层 刷新 浮层关闭父窗口刷新
- js window.open()实现打印,如何在关闭打印窗口时刷新父窗口