使用技术 jQuery druid MySQL Jackson AJAX JSON
–JSP页面
Created by IntelliJ IDEA.
User: QiLin
Date: 2020/7/28
Time: 13:55
To change this template use File | Settings | File Templates.
--%>
管理员登录管理员登录
用户名:
密码:
验证码:
记住密码
记住密码
${sessionScope.msg1}
${sessionScope.msg2}
登录失败!
$(function () {
//密码重置为空
$("#user").keydown(function () {
$("#password").val("");
});
//刷新验证码
$("#vcode").click(function () {
var s= new Date().getTime();
this.src = "Check_card?time="+s;
});
//填充密码
$("#user").blur(function () {
$.post("GetCookie",{uname:$(this).val()},function (data) {
$("#password").val(JSON.parse(data));
}
);
});
});
Servlet—登录package web;
import service.UserService;
import service.impl.UserServiceImpl;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
import java.io.IOException;
import java.net.URL;
import java.net.UR