代码仓库:https://github.com/KarezaC/StudentsInformationManagerSystem
emmmmm,坚持写博客真难啊,向哪些几百篇博文的博主大佬低头。
接上一次,这次一定多坚持几天!
第一件事情,把上次的index.html页面写成jsp的,为了在页面下方增加一个时间显示。代码如下:
<!--这里是welcome.jsp-->
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,
minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>欢迎0.0</title>
</head>
<body>
<h1 align="center">欢迎使用学生管理系统</h1>
<a href="login.jsp"><h2 align="center">点击进入</h2></a>
<div align="center" style="width:100%; position:fixed; bottom:0;">
<%!Date time = new Date();%>
<%
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日 E HH时mm分ss秒");
%>
<% out.println(sdf1.format(time));%>
</div>
</body>
</html>
效果:

最低0.47元/天 解锁文章
2万+

被折叠的 条评论
为什么被折叠?



