有內嵌iframe的頁面,當session過期時,點擊連接重定向后的跳轉會在iframe中跳轉,在登錄頁面中加入下面的代碼臣樱,就會在最外層頁面跳轉
?code:
?if (window != top) {
top.location.href = location.href;
}
window.location.href、location.href 是本頁面跳轉
?parent.location.href 是上一層頁面跳轉
?top.location.href 是最外層的頁面跳轉
有內嵌iframe的頁面,當session過期時,點擊連接重定向后的跳轉會在iframe中跳轉,在登錄頁面中加入下面的代碼臣樱,就會在最外層頁面跳轉
?code:
?if (window != top) {
top.location.href = location.href;
}
window.location.href、location.href 是本頁面跳轉
?parent.location.href 是上一層頁面跳轉
?top.location.href 是最外層的頁面跳轉