关于 iframe session登录超时 嵌套问题

来源:互联网 发布:动漫设计软件 编辑:程序博客网 时间:2024/04/29 23:49

session超时刷新后登录页面嵌入在iframe中的解决办法

只要在login.jsp页面上加上以以下js代码


<script type="text/javascript">/** * 用于跳出iframe 登录超时问题 */var _topWin = window;while (_topWin != _topWin.parent.window) {_topWin = _topWin.parent.window;}if (window != _topWin)_topWin.document.location.href = '${pageContext.request.contextPath}/login.jsp';</script>


0 0