?? login.jsp
字號(hào):
<%@ page language="java" contentType="text/html; charset=gbk"
pageEncoding="gbk"%>
<%
String action =request.getParameter("action");
if (action != null && action.equals("Login")){
String username = request.getParameter("uname");
String password = request.getParameter("pwd");
if (username.equals("admin") && password.equals("admin")){
out.println("歡迎管理員" + request.getParameter("uname") + "登錄");
session.setAttribute("admin", "true");
response.sendRedirect("ShowArticleTree.jsp");
//return;
}else{
out.println("用戶名或密碼錯(cuò)誤");
//return;
}
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title>管理員登錄</title>
</head>
<body>
<div align="center"><font color="red" size=5><b>管理員登錄</b></font><br>
<form action="Login.jsp" method="post">
<table align="center" broder=0>
<input type="hidden" name="action" value="Login">
<tr><td><font color="red" size=5><b>用戶名:</b></font></td><td>
<input type="text" name="uname" size=20></td></tr>
<tr><td><font color="red" size=5><b>密 碼:</b></font></td><td>
<input type="password" name="pwd" size=20></td></tr>
</table>
<input type="submit" value="提交">
<input type="reset" value="重置">
<br><br>
<a href="New.jsp"><font color="blue" size=4><b>新用戶注冊(cè)</b></font></a>
</form>
</div>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -