ITeye博客

session过期跳转到登陆页面并跳出iframe框架

kabuka · 2012-04-06 17:17 · Web前端 · Markdown

可以用javaScript解决 
在你想控制跳转的页面,比如login.jsp中的<head>与</head>之间加入以下代码: 

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


 

则在系统超时想在框架中打开登录页时,则login.jsp自身进行判断后跳出iframe等框架要。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。