JS 2010-10-18 15:31:57 閱讀42 評論0 字號:大中小 訂閱
(1)session過期后登陸頁面跳出iframe頁面問題
登陸頁面增加javas
function window.on
{
if(window.parent.length>0)
window.parent.location=location;
}
或者:
<script>
if (window != top)
top.location.href = location.href;
</script>
(2)自動跳出iframe的代碼
<script type="text/javas
if (top.location !== self.location) {
top.location=self.location;
}
</script>
(3)在框架頁內(nèi)的退出操作:
<script type="text/javas
if (top.location !== self.location) {
top.location = "../index.jsp";//跳出框架,并回到首頁
}
</script>