0
我有一個HTML頁面,可以爲應用程序彈出一個全屏窗口。我想要做的是檢測彈出窗口何時關閉並重新打開。當JavaScript關閉並重新打開時,JavaScript可以檢測到一個彈出窗口?
var drawingwindow;
function popup(url)
{
params = 'width='+screen.width;
params += ', height='+screen.height;
params += ', top=0, left=0'
params += ', fullscreen=yes';
params += ', resizeable=no';
newwin=window.open(url,'drawingwindow', params);
if (window.focus) {newwin.focus()}
return false;
}
然後,我觸發彈出從HTML按鈕
<input type="submit" name="submit" value="Submit" onclick="popup('hello.php')"/>
我想要做的某種方式是檢查drawingwindow第一頁 - 如果它關閉 - 立即重新打開它。它是主畫布「drawingwindow」上的繪圖應用程序的一部分,它可以永久關閉繪圖窗口。
大多數瀏覽器允許打開彈出式窗口只爲點擊。因此,您無法打開(或重新打開)它,而無需用戶執行操作(單擊)。 –
window.children訪問子窗口,== 0如果沒有。 –