强行装载别人的页面

像百度空间使用如下代码防止页面被框架:

            if (top.location != self.location) {   
                top.location = self.location;   
            }

我们可以使用以下代码破解它!

   var location='';


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
        <title>装载别人的页面</title>
        <script>var location=''</script>
    </head>

    <frameset cols="340px,*">
        <frame src="http://weibo.com/jslouvre"></frame>
        <frame name="main" src="http://hi.baidu.com/dzyl851/blog/item/84a80e3e56d750ba023bf6fb.html"></frame>
    </frameset>

    <noframes>
        你的浏览器不支持框架网页!
    </noframes>
</html>
原文地址:https://www.cnblogs.com/rubylouvre/p/2572214.html