[Linux 常用技巧] 防止网页被iframe盗用的代码

Apr 30th, 2008

转载本站文章请注明,转载自:扶凯[http://www.php-oa.com]

本文链接: http://www.php-oa.com/2008/04/30/iframe.html

 

我的网站被盗用了,搞了个防iframe盗用的代码.

<script>
if(parent.window.frames[0]){
alert('非法盗用www.php-oa.com网站,点击确定将转到主页!');
parent.window.close();
}
</script>

方法二

<SCRIPT LANGUAGE=JAVASCRIPT>
<!–
if (top.location !== self.location) {
top.location=self.location;
}
</SCRIPT>

Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪 ViVi 365Key 网摘 天极网摘 和讯网摘 博拉网 POCO 网摘 饭否 QQ 书签 Digbuzz 我挖网 Mister Wong
No comments yet.