开发者

How do I find out if a script is running in an iframe

Basically, I just want something not to run when a page is loaded into an iframe. Is there an easy way to do this?开发者_运维技巧


if (window != window.top) { 
    // the script runs in an iframe
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜