欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

防止登錄頁面出現(xiàn)在frame中js代碼

 更新時間:2014年07月22日 15:20:34   投稿:whsnow  
使用frame頁面嵌套,重啟了服務(wù)器的時候會出現(xiàn)登錄頁面在frame頁面中出現(xiàn),解決方法是在登錄頁面里面用js判斷下當(dāng)前的地址信息

在使用frame頁面嵌套開發(fā)的時候,遇到重啟了服務(wù)器的時候會出現(xiàn)登錄頁面在frame頁面中出現(xiàn),

所以需要在登錄頁面里面用js判斷下當(dāng)前的地址信息,然后跳轉(zhuǎn)到登錄的單獨頁面中。

js代碼如下:

$("document").ready(function(){ 
//防止在frame里面出現(xiàn)登錄頁面 
if(top.location!==self.location){ 
//alert(top.location); 
//alert(self.location); 
top.location.href=self.location.href; 
} 
});

相關(guān)文章

最新評論