Javascript 如何检查文档是否在IFrame中打开?
有没有办法知道您的页面是否在Javascript 如何检查文档是否在IFrame中打开?,javascript,iframe,dhtml,Javascript,Iframe,Dhtml,有没有办法知道您的页面是否在IFrame中打开 我的想法是查看窗口对象是否具有.parent属性,但对于由Javascript的window.open()函数打开的独立窗口,显然也是如此 if (window.top != window.self) { }
IFrame
中打开
我的想法是查看窗口
对象是否具有.parent
属性,但对于由Javascript的window.open()函数打开的独立窗口,显然也是如此
if (window.top != window.self)
{
}