📄 admin_login.jsp
字号:
<%@ page pageEncoding="gb2312" %>
<%@ page contentType="text/html; charset=gb2312" %>
<% request.setCharacterEncoding("gb2312"); %>
<%@ page language="java" %>
<table align=center >
<tr align=center>
<td width=100% colspan=4 height=15 bgcolor="#2299ff">
<font color="#ffffff">管理员通道</font>
</td>
</tr>
<% if (request.getAttribute("error") != null){ %>
<tr>
<td width=100% align=center colspan=4 height=36>
<font color=red><b><%=request.getAttribute("error")%></b></font>
</td>
</tr>
<%
}
%>
<form name="form1" method="POST" action="AdminLogin">
<tr>
<td align=right width=40%>登录名称:</td>
<td colspan=2 width=70%>
<input type="text" name="username" value="">
</td>
</tr>
<tr>
<td align=right>登陆密码:</td>
<td colspan=2>
<input type="password" name="pwd" value="">
</td>
</tr>
<tr>
<td align=right>验证码:</td>
<td colspan=2>
<input type="text" name="random" value="">
<image align=middle src="Random.jsp">
</td>
</tr>
<tr>
<td align=left> </td>
<td align=left colspan=2>
<input type="button" value="提交" onclick="Check()">
<input type="reset" value="重填">
<!-- 客户端验证 -->
<script language="Javascript1.2">
function Check()
{
var re=/\'|\*|\n|\r|<|>|&|\\|"| /;
if(document.form1.username.value==""&& re.test(document.form1.username.value) )
{
window.alert("请填写你的登录名!");
window.form1.username.focus();
return false;
}
if(re.test(document.form1.username.value)) {
window.alert("输入中含有非法字符!");
window.form1.username.focus();
return false;
}
if(document.form1.pwd.value=="")
{
window.alert("请填写密码!");
window.form1.pwd.focus();
return false;
}
if(re.test(document.form1.pwd.value)) {
window.alert("密码中含有非法字符!");
window.form1.pwd.focus();
return false;
}
if(document.form1.random.value=="")
{
window.alert("请验证密码!");
window.form1.random.focus();
return false;
}
document.form1.submit();
}
</script>
</td>
</tr>
</form>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -