![](/img/trans.png)
[英]How can I access a parent window from a child window after a child popup is opened in javascript?
[英]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.