智享云库系统九

综合开发

用java实现的登录页面,实现了客户端(浏览器)到服务器(Tomcat)再到后端(servlet程序)数据的交互。

登录html代码:

<!DOCTYPE>
<html>
<head>

<title>登录</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta http-equiv="content-type" content="text/html;charset=utf-8">

<link type="text/css" th:href="@{bootstrap/css/bootstrap.min.css}" rel="stylesheet">
<link rel="stylesheet" type="text/css" th:href="@{css/user/login.css}" >

<script type="text/javascript">
	//跳出框架显示该页面
	if (window != top)
		top.location.href = location.href;
</script>
</head>

<body>
	<div class="container">

		<form class="form-signin" target="_top" action="/user/login" method="post" id="loginForm">
			<input type="hidden" name="method" value="login" />
			<h2 class="form-signin-heading">请登录</h2>
			<table>
				<tr>
					<td width="70"></td>
					<td><label class="error" id="msg" th:text="${msg}"></label></td>
				</tr>
				<tr>
					<td width="70"><h4>用户名</h4></td>
					<td><label class="sr-only" for="inputUserName">用户名</label> <input
						name="uname" class="form-control" type="text"
						required="" value="" /></td>
				</tr>
				<tr>
					<td height="20">&nbsp;</td>
					<td><label id="loginnameError" class="error"></label></td>
				</tr>
				<tr>
					<td><h4>&nbsp;&nbsp;&nbsp;&nbsp;</h4></td>
					<td><label class="sr-only" for="inputPassword"> 密码 </label> <input
						class="form-control" type="password" name="password" required=""
						value="" /></td>
				</tr>
				<tr>
					<td height="20">&nbsp;</td>
					<td><label id="loginpassError" class="error"></label></td>
				</tr>

				<tr>
					<td>&nbsp;</td>
					<td align="left">
						<button class="btn btn-lg btn-primary btn-block" type="submit">
							登录</button>
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>

登录显示:
在这里插入图片描述
进入主页面:
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值