一个简单的登陆页面主要是难在布局样式,所以我就借花献佛,借用了一位大佬的样式框架,省了不少时间。大佬的文章链接见文章底部
先上图,看看页面具体什么样:
看完图的效果接下来,来研究一下代码吧
login.jsp的代码
表单提交,需要在输入的文本框处设置一个name,作为参数名
<%--
Created by IntelliJ IDEA.
User: Administrator
Date: 2020/4/25
Time: 10:40
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>用户登录</title>
</head>
<body>
<div id="login-frame">
<p id="image-logo"><img src="images/login/logo.png" style="width: 50px;height: 50px;"></p&g