login.jsp
2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%
Cookie[] cookies = request.getCookies();
String userName = "";
if (cookies != null && cookies.length > 0) {
for (int i = 0; i < cookies.length; i++) {
Cookie cookie = cookies[i];
if (cookie.getName().equals("userName")) {
userName = cookie.getValue();
}
}
}
%>
<head>
<jsp:include page="${ctx }/view/common/meta.jsp" />
<link href="${ctx }/resource/css/auth.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function() {
if ('${msg}' != '') {
alert('${msg}');
}
});
</script>
</head>
<body>
<jsp:include page="${ctx }/view/common/header1.jsp" />
<div class="loginbox">
<div class="logintit">登录</div>
<div class="logincon">
<form id="login-form" action="${ctx }/login" method="post">
<div class="inputs">
<div class="nameyh">
账号 <input id="username" name="username" type="text" placeholder="会员号/手机号" class="input0" maxlength="11" value="<%=userName%>" />
<span class="errortip" id="tip-username"></span>
</div>
<div class="password">
密码 <input type="password" name="password" id="password" class="input1" maxlength="8" />
<span class="errortip" id="tip-password"></span>
</div>
<%-- <div class="yanzheng">验证码
<input name="code" id="code" type="text" class="input0" maxlength="4" />
<img id="imgCaptcha" alt="验证码" style="vertical-align:middle" src="${ctx }/captcha-image"
width="70px;" height="27px;" border="1" id="validaCode" />
<a id="changeCaptcha" href="javascript:changeCaptcha()" class="blues">看不清,换一张</a>
<span class="errortip" id="tip-code"></span>
</div> --%>
<div class="xieyi">
<input type="checkbox" id="loginagree" checked="checked" />
<a target="view_window" href="https://www.zhao.com/trade/article?id=96&cid=9">我已认真阅读并同意遵守《赵涌牛服务协议》 </a>
<span class="errortip" id="tip-loginagree"></span>
</div>
</div>
<div class="loginenter">
<div class="juli">
<label><input name="remberme" type="checkbox" value="remberme" <%if (!"".equals(userName)) {%>
checked="checked" <%}%> id="remberme" /> 记住会员号</label>
</div>
<a href="#" id="doLogin" class="btnw loginbtn">登录</a>
</div>
<input type="hidden" name="referer" value="${referer }" />
</form>
</div>
</div>
<jsp:include page="${ctx }/view/common/bottom.jsp" />
</body>
</html>