📄 login.jsp
字号:
<%@ page contentType="text/html; charset=GBK"%>
<SCRIPT language=JavaScript src="include/check.js" type="text/javascript"></SCRIPT>
<script language="JavaScript">
function userLogin(){
if(document.frmAction.username.value == null ||
checkLength(document.frmAction.username.value)<1){
alert('请输入用户名!');
return ;
}
if(document.frmAction.password.value == null ||
checkLength(document.frmAction.password.value)<1){
alert('请输入用户密码!');
return ;
}
document.frmAction.action="loginservlet?method=user_login";
document.frmAction.submit();
}
function userReg(){
document.frmAction.action="user_add.jsp";
document.frmAction.submit();
}
</script>
<%
String userName = request.getParameter("username");
if(userName == null) userName = "";
String passWord = request.getParameter("password");
if(passWord == null) passWord = "";
%>
<html>
<head>
<title>
用户登录-<%=bbs.Constant.TITLE%>
</title>
</head>
<body bgcolor="#ffffff">
<br>
<br>
<br>
<br>
<FORM method="POST" name="frmAction" >
<center>
<jsp:include page="error_info.jsp">
<jsp:param name="desc" value="login_error"/>
</jsp:include>
<table border="1px #76aef0 solid" cellspacing="0" cellpadding="1" align=center bgColor=#E4E8EF>
<tr>
<td width="50%">用户名:</td>
<td width="50%"><input type="text" name="username" value="<%=userName%>"/></td>
</tr>
<tr>
<td width="50%">密码:</td>
<td width="50%"><input type="password" name="password" value="<%=passWord%>"/></td>
</tr>
<tr>
<td width="50%">
<center>
<input type="submit" onclick="userLogin();" value="登录" class="button"/>
</center>
</td>
<td width="50%">
<center>
<input type="submit" onclick="userReg();" value="注册" class="button"/>
</center>
</td>
</tr>
<!--
<tr>
<td colspan="2">
<center>
<input type="submit" onclick="userLogin();" value="登录" class="button"/>
</center>
</td>
</tr>
-->
</table>
</center>
</FORM>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -