How can a browser window know if it is a parent window or a child window using JavaScript?
如何使用JavaScript知道浏览器窗口是父窗口还是子窗口?
I was hoping to make use of this in a conditional.
我希望在有条件的情况下使用它。
if(parentWindow){//..
Thank you for any help.
感谢您的任何帮助。
1 个解决方案
#1
if( window !== top )
//then you are a child of something
#1
if( window !== top )
//then you are a child of something