js,防止,iframe
web前端-js教程
本文实例讲述了js实现防止被iframe的方法。分享给大家供大家参考。具体如下:成绩查询系统源码 php,生产环境部署ubuntu,爬虫地理学,php中文网手机百度看不了,seo经验范文lzw
方法一:织梦婚庆公司源码,ubuntu根目录下,tomcat启动有繁体中文,爬虫下载文章,php网站用什么软件好,seo如何爆破lzw
// Break out of an iframe, if someone shoves your site// into one of those silly top-bar URL shortener things.//// Passing `this` and re-aliasing as `window` ensures// that the window object hasn't been overwritten.//// Example:// var window = 'haha, punked!';//// Note: Probably unnecessary, but just for kicks.(function(window) { if (window.location !== window.top.location) { window.top.location = window.location; }})(this);方法二:
易语言源码查看器,vscode vim搜索,进ubuntu老是重启电脑,重启tomcat过程,新浪云SAE sqlite,dedecms 插件乱码,前端框架式构图照片,python爬虫案例2004,php 汉字拼音,京东推广seo,php版网站状态监控,网页透明背景素材,jquery 注册登录页面模板下载,源代码页面描述,图书管理系统源码免费,小说网站cms比较程序lzw
// A more cryptic one-liner, to awe & impress.//// No need to protect `window` since `this` is// immutable, and at the topmost level means// `window` anyways. Here, we compare locations// on the left side of the "&&" and execute the// code in parenthesis if that condition is// true (top location isn't iframe location).//// Otherwise, nothing happens. It's basically an// if statement without wrapping curly brackets.//// Weird, I know. But pretty cool, right? :)this.top.location !== this.location && (this.top.location = this.location);