admin_logout.jsp
来自「图书管理系统,B/S,C/S都有,附有源代码」· JSP 代码 · 共 40 行
JSP
40 行
<%@ page contentType="text/html; charset=GBK" language="java" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<link rel=stylesheet href="../css/library.css" type="text/css">
<title>图书管理系统</title>
</head>
<body>
<%
String supervisor=(String)session.getAttribute("supervisor");//从SESSION中获取管理员ID
String msg_title;
String msg_content;
if(supervisor!=null){
session.setAttribute("supervisor",null);
msg_title="成功";
msg_content="注销成功!";
}else{
msg_title="错误";
msg_content="对不起,您尚未登录!";
}
//自动跳转返回首页
response.setHeader("Refresh","2;url=admin_login.jsp");
%>
<table cellpadding="0" cellspacing="0" border="0" width="550" bgcolor="#2E79BE" align="center">
<tr>
<td><table cellpadding="3" cellspacing="1" border="0" width="100%">
<tr>
<td width="100%" height="22" align="center" bgcolor="#6CA6D5"><%=msg_title%></td>
</tr>
<tr bgcolor="#DCEFFA">
<td height="30" align="center"><%=msg_content%></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?