代码片段
5 行
<script type="text/javascript">  
    if(top.location != self.location){  
    top.location = self.location;//防止页面被框架包含  
    }  
</script>
代码片段
5 行
top.location.href 最上层的地址
windows.location.href自己的地址
self指代当前窗口对象,属于window最上层的对象;
location.href 指的是某window对象的URL地址.
self.location.href指当前窗口的URL地址,去掉self默认为当前窗口的URL地址