導航:首頁 > 編程語言 > 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

友情鏈接