login.jsp

来自「java oracle 示例 prefirst.rar」· JSP 代码 · 共 56 行

JSP
56
字号
<%@ page language="java" contentType="text/html; charset=gb2312"
	pageEncoding="gb2312"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>login</title>
<link rel=stylesheet href="../css/stylesheet.css" type="text/css">
<script language="javascript"><!--function checkUser(){if(document.login.username.value==""){alert("用户名不能为空。");document.login.username.focus();}elseif(document.login.password.value==""){alert("密码不能为空。");document.login.password.focus();}else{
document.login.action="/prefirst/LoginServlet";document.login.submit();}
}-->
</script>
</head>

<body>
<div align=center>
<form method="post" name="login">
<table>
	<tr>
		<td colspan="2">
		<h3 align="center">用户登录:</h3>
		</td>
	</tr>
	<tr>
		<td>用户名:</td>
		<td><input type="text" name="username" /></td>
	</tr>
	<tr>
		<td>密码:</td>
		<td><input type="password" name="password" /></td>
	</tr>
	<tr>
		<td></td>
		<td><a href="javascript:void(0)" onclick="checkUser();">登录</a> <input
			type="button" name="button1" value="登录" onclick="checkUser();" /> <input
			type="reset" name="reset" value="重置" /></td>
	</tr>
</table>
</form>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?