开发者

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

开发者 https://www.devze.com 2022-12-11 04:34 出处:网络
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) {

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

精彩评论

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