?? login.jsp
字號:
<%@ page language="java" contentType="text/html; charset=GB2312"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title>用戶登錄</title>
<style>
table {font-size:9pt}
body {font-size:9pt}
.TdBgStyle {background-color: #CCC}
</style>
<script language="javascript">
function login() {
if(logoinForm.user.value == "") {
alert("用戶名不能為空!");
logoinForm.user.focus();
return;
}
if(logoinForm.passwd.value == "") {
alert("密碼不能為空!");
logoinForm.passwd.focus();
return;
}
logoinForm.submit();
}
</script>
</head>
<body>
<center style="color:red">
<%
String message = (String)request.getAttribute("message");
if(message == null)
message = "";
%>
<%=message %>
</center>
<form action="login" method="post" id="logoinForm">
<table width="300" align="center" border="1" cellpadding="3" cellspacing="1" style="border: 1px solid #000;border-collapse:collapse">
<tr>
<th colspan="2" align="center">用戶登錄</th>
</tr>
<tr>
<td align="right" class="TdBgStyle">用戶名:</td>
<td align="left">
<input type="text" size="20" name="user" id="user">
</td>
</tr>
<tr>
<td align="right" class="TdBgStyle">密 碼:</td>
<td align="left">
<input type="password" size="20" name="passwd" id="passwd">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<a href="register.jsp">注冊</a>
<input type="button" name="ok" value="登 錄" onClick="login()">
</td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -