//在你想控制跳转的页面,如login.jsp中的<head>与</head>之间加入以下代码: if(window != top){ //解决Session过期跳转到登录页面并跳出iframe等框架问题 top.location.href = location.href; }