学生活动管理网站的改进

在上个学期里,学期结尾的时候我用Java建了一个学生活动管理网站,因为学期即将结束,考试和学业的压力使得我只完成了这个网站的基本功能,注册账号、登录、查询活动以及评论等基础功能,而再回头看看自己这个网站,我认为缺少了一个搜索的功能,于是在昨天将这个功能补上。

 

 

这就是新添的搜索功能的截图,代码如下

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%
response.setContentType("text/html;charset=UTF-8");
request.setCharacterEncoding("UTF-8");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'search.jsp' starting page</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">
<link href="css/bootstrap.min.css" rel="stylesheet">
<script src="js/jquery-1.11.1.js">
</script>
<script src="js/bootstrap.min.js">
</script>
<style type="text/css">
#div1 {
margin: 110px 460px;
}

#div2 {
width: 580px;
height: 60px;
}

#div3 {
width: 420px;
float: left;
height: 35px;
margin-left: 0px;
}

#submit_btn {
margin-top: -20px;
margin-left: 440px;
width: 33px;
height: 33px;
background: url(images/search.png) no-repeat center;
cursor: pointer;
display: block;
font-size: 0;
line-height: 0;
text-indent: -9999px;
}
</style>
</head>
<body>
<div id="div1">
<form role="form" action="PostList" method="post">
<img src="images/logo.jpg" width="448" height="201"> <br>
<br>
<div id="div2" class="form-group">
<input id="div3" type="text" class="form-control" name="querytitle"
placeholder="搜活动、搜板块"> &nbsp;&nbsp;<input type="hidden"
name="actionType" value="indexQuery" /> &nbsp;&nbsp; <input
type="submit" id="submit_btn" />
</div>
</form>
</div>
</body>
</html>

 

posted @ 2021-03-15 11:09  地中海绅士  阅读(61)  评论(0)    收藏  举报