簡體   English   中英

子框架打開一個彈出窗口。 如何檢查是否從父級打開了該彈出窗口?

[英]Child frame opens a popup. How do I check if that popup is opened from the parent?

我的頁面包含一個框架。 從這個框架中,我可以打開一個彈出窗口。 我如何知道是否從父頁面打開了此彈出窗口?

if (window.opener && 
    window.opener.top === window.opener) {
    // this window was opened from a window that is it's own top (not an IFrame)
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM