blog » linux常用技巧 » 防止网页被iframe盗用的代码
防止网页被iframe盗用的代码
我的网站被盗用了,搞了个防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>

Leave a Reply