导航:首页 > 编程语言 > jsp怎么关闭子窗口

jsp怎么关闭子窗口

发布时间:2025-04-14 16:35:31

『壹』 子窗口刷新父窗口然后关闭

1 history.go(0)
2 location.reload()
3 location=location
4 location.assign(location)
5 document.execCommand('Refresh')
6 window.navigate(location)
7 location.replace(location)
8 document.URL=location.href
这几个都可以刷新
比如:父窗口
<a href="javascript:void(0)" onclick="window.open('child.html','child','width=400,height=300,left=200,top=200');">打开子窗口</a>

子窗口
<script language="JavaScript" type="text/javascript">
<!--
function refreshParent() {
window.opener.location.href = window.opener.location.href;
if (window.opener.progressWindow)
{
window.opener.progressWindow.close();
}
window.close();
} //-->
</script>

<a href="javascript:void(0)" onclick="refreshParent()">刷新父窗口并关闭当前窗口</a>

『贰』 java中如何使“点击子窗口的一个按钮时可以退回到父窗口并关闭此子窗口”

你可以在父子窗口同时分别添加main方法
这样耦合度更低
父子没有任何联系
然后在子窗口按钮中用类名调用
父窗口main方法
同时调用子窗体setVisible(false);
就行了

『叁』 jsp从子窗口跳转到父窗口

在页面加一个javascript

if(self!=top){
window.parent.document.location.href = document.location.href;
}

就可以了

阅读全文

与jsp怎么关闭子窗口相关的资料

热点内容
sql语言提示工具 浏览:728
微信发不了excel文件 浏览:539
监管大数据分析由哪个部门建立 浏览:793
康福视频69手机版本 浏览:45
怎么查看app的编程语言 浏览:323
荣耀7怎么复制文件夹 浏览:253
苹果系统管理文件 浏览:842
linux特殊文件有哪些权限 浏览:610
安卓文件路径映射 浏览:786
懒人看版本74 浏览:469
暴风影音老版本下载 浏览:331
华为荣耀5c升级70 浏览:53
文件夹的菜单栏 浏览:996
网络信息采集技术 浏览:326
qq文件tencent文件夹里找不到 浏览:631
月影剑痕天剑升级 浏览:190
网络直播平台监督APP 浏览:970
建立公司网站网页需要多少钱 浏览:53
比特币java 浏览:13
nrg文件怎样转换 浏览:858

友情链接