session过期跳出irame

在登录页底部加入

<script type="text/javascript">
if (window != top)
top.location.href = location.href;
</script>

当session过期的时候,我们会让网页回到login 但是这时候 login页面会在ifame里面,这时候,我们在login判断,如果当前页面不是在顶部页面

则重新跳转到顶部页面。

原文地址:https://www.cnblogs.com/linyijia/p/5542404.html