Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个页面包含一个框架。在这个框架内,我可以打开一个弹出窗口。如何判断此弹出窗口是否从父页面打开?
if (window.opener && window.opener.top === window.opener) { // this window was opened from a window that is it's own top (not an IFrame) }