📄 userlong.inc
字号:
<%@ page language="java" pageEncoding="GB2312"%>
<%
if(session.getAttribute("username")!=null){
response.sendRedirect("userindex.jsp");
}
int number = 9;
int sum = 0;
String numCheck = "";
for (int i = 1; i <= 4; i++) {
sum = (int) (Math.random() * number);
numCheck = numCheck + sum;
}
session.setAttribute("numCheck", numCheck);
String action = request.getParameter("longaction");
if (action == null) {
action = "";
}
String input="";
if (action.equals("")) {
input = "";
}
if (action.equals("numerror")) {
input = "验证码错误";
}
if(action.equals("usernameerror")){
input ="用户名不存在,请注册";
}
if(action.equals("userpasserror")){
input ="密码错误";
}
if(action.equals("exit")){
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<body >
<form action="servlet/logingCheck"name="logingfrom" method="POST">
<table width="158" height="0" background="images/k.jpg">
<tr>
<td>
用户名:
</td>
<td>
<input type="text" size="10" name="LoginName">
</td>
</tr>
<tr>
<td>
密码:
</td>
<td>
<input type="password" size="10" name="LoginPw">
</td>
</tr>
<tr>
<td>
<%=numCheck%>
</td>
<td>
<input type="text" size="5" name="numCheck">
</td>
</tr>
<tr>
<td>
<input type="submit" value="登陆">
</td>
<td>
<input type="Reset" value="重置">
</td>
</tr>
<tr>
<td rowspan="1" colspan="2">
如果没注册请<a href="adduser.jsp" target="_blank">点此注册</a>
</td>
</tr>
</table>
<font color="#ff0000"><%=input%> </font>
</form>
<br>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -