导航:首页 > 编程语言 > 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怎么关闭子窗口相关的资料

热点内容
文件系统坏了怎么办 浏览:261
小公司网络布线 浏览:515
怎么用二维码编程 浏览:341
f9b文件能用手机看吗 浏览:364
手机暴风视频文件夹 浏览:394
vsftpdlinux下载文件 浏览:948
文件名修改后快捷方式还可以用吗 浏览:387
亲密爱人qq相册名字 浏览:884
怎么修改手机原始密码 浏览:230
榆次网站优化怎么样 浏览:537
vb窗体文件如何打开 浏览:810
百度找图怎么跳转网站 浏览:284
安卓44如何隐藏文件夹 浏览:92
sr100怎么编程序 浏览:795
苹果手机怎样保存信息 浏览:379
安卓patch是什么文件 浏览:819
2003word审阅 浏览:387
手机时间查找新文件 浏览:695
数据库管理员怎么入行 浏览:852
安卓nba2k17修改能力 浏览:868

友情链接