admin管理员组

文章数量:1323317

How can a browser window know if it is a parent window or a child window using JavaScript?

I was hoping to make use of this in a conditional.

if(parentWindow){//..

Thank you for any help.

How can a browser window know if it is a parent window or a child window using JavaScript?

I was hoping to make use of this in a conditional.

if(parentWindow){//..

Thank you for any help.

Share asked Jul 22, 2009 at 17:12 AbsAbs 58k103 gold badges282 silver badges417 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 11
if( window !== top ) 
    //then you are a child of something

本文标签: javascriptHow to know if a window is a child or parent windowStack Overflow