post请求
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
table{
margin: auto;
}
td{
border: 1px solid darkturquoise;
}
</style>
</head>
<body>
<form method="post" action="UserLoginServlet">
<table>
<tr>
<td>
<label for="userName">账号</label>
<input type="text" id="userName" name="userName">
</td>
</tr>
<tr>
<td>
<label for="password">密码</label>
<input type="password" id="password" name="password">
</td>
</tr>
<tr>
<td>
<input type="submit" value="登录">
<input type="reset">
</td>
</tr>
</table>
</form>
</body>
</html>
登录:
查看:
get请求:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
table{
margin: auto;
}
td{
border: 1px solid darkturquoise;
}
</style>
</head>
<body>
<form method="get" action="UserLoginServlet">
<table>
<tr>
<td>
<label for="userName">账号</label>
<input type="text" id="userName" name="userName">
</td>
</tr>
<tr>
<td>
<label for="password">密码</label>
<input type="password" id="password" name="password">
</td>
</tr>
<tr>
<td>
<input type="submit" value="登录">
<input type="reset">
</td>
</tr>
</table>
</form>
</body>
</html>
登录:
查看: