框架页面下跳转到登录页面,会遇到登录页面仍然在框架中
第一种:在login.jsp的body中加入下面这句
<script type="text/javascript">
if (top.location !== self.location) {
top.location=self.location;
}
</script>
这个js就能解决问题了!
第二种:
点击退出时调用这个logOut()方法
function logout(){
if( confirm("你确实要退出吗?")){
window.parent.location.href="logOut";
}
else{
return;
}
注意:必须是parent