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

热点内容
三星有密码锁可以关机 浏览:293
游戏编程设计怎么做 浏览:509
脸谱网账号密码大全 浏览:98
编程猫什么时候才能登录 浏览:600
在哪里下载人社下达的文件 浏览:981
数控车单线油槽怎么编程 浏览:254
文件解压输出的目录可以放在哪里 浏览:65
苹果7数据线原装什么样 浏览:25
网络电视如何清空历史 浏览:53
oppo手机网银收藏在哪个文件夹 浏览:897
linux文件改名命令 浏览:806
word2007插入页码是灰色 浏览:771
uc视频没有缓存文件 浏览:672
气象数据链是什么意思 浏览:375
平板电脑怎么共享电脑文件 浏览:694
linux装的mysql里边没有文件夹 浏览:675
模拟json 浏览:936
三星s6手机视频在哪个文件里 浏览:597
文件夹书包 浏览:367
android判断xml文件是否存在 浏览:701

友情链接