有内嵌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 是最外层的页面跳转