導航:首頁 > 編程語言 > 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怎麼關閉子窗口相關的資料

熱點內容
網路中常用的傳輸介質 瀏覽:518
文件如何使用 瀏覽:322
同步推密碼找回 瀏覽:865
樂高怎麼才能用電腦編程序 瀏覽:65
本機qq文件為什麼找不到 瀏覽:264
安卓qq空間免升級 瀏覽:490
linux如何刪除模塊驅動程序 瀏覽:193
at89c51c程序 瀏覽:329
怎麼創建word大綱文件 瀏覽:622
裊裊朗誦文件生成器 瀏覽:626
1054件文件是多少gb 瀏覽:371
高州禁養區內能養豬多少頭的文件 瀏覽:927
win8ico文件 瀏覽:949
仁和數控怎麼編程 瀏覽:381
項目文件夾圖片 瀏覽:87
怎麼在東芝電視安裝app 瀏覽:954
plc顯示數字怎麼編程 瀏覽:439
如何辨別假網站 瀏覽:711
寬頻用別人的賬號密碼 瀏覽:556
新app如何佔有市場 瀏覽:42

友情鏈接