強行裝載別人的頁面

像百度空間使用以下代碼防止頁面被框架:

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

咱們可使用如下代碼破解它!html

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 >
相關文章
相關標籤/搜索