<%
if(session.getAttribute("username")==null||session.getAttribute("username")==""){
response.sendRedirect("../login/login.jsp");
return;
}
else {
if(request.getParameter("id").equals("1")){
session.invalidate();
out.println("<script language='javascript'>alert('确定要注销吗?');"+"window.top.location.href='../login/login.jsp';</script>");
}
// out.println("<script language='javascript'>alert('确定要退出吗?');"+"window.location.href='../login/login.jsp';</script>");
else{
session.invalidate();
out.print("<script language='javascript'>top.close();</script>");
}
}
%>
</body>
<td align="center" width="5%"><a href="main/exit.jsp?id=2" targer="_top">退出</a></td>
<%
if(session.getAttribute("username")==null||session.getAttribute("username")==""){
response.sendRedirect("../login/login.jsp");
return;
}
else {
if(request.getParameter("id").equals("1")){
session.invalidate();
out.println("<script language='javascript'>alert('确定要注销吗?');"+"window.top.location.href='../login/login.jsp';</script>");
}
// out.println("<script language='javascript'>alert('确定要退出吗?');"+"window.location.href='../login/login.jsp';</script>");
else{
session.invalidate();
%>
<script language="javascript">
top.opener=null; //不过这个我暂时还不知道什么意思,应该是刷新原来的页面
top.close();
</script>
<%
}
}
%>
</body>
function exit(){
window.open('../login/login.jsp','_top')
}
</script>