⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search.jsp

📁 一个bbs论坛系统
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!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 rel="stylesheet"  href="css/block.css" />
</head>
<script type="text/javascript" language="JavaScript">
	function changeCondition() {
		var condition = document.getElementById("condition").value;
		var showConditionSpan = document.getElementById("showCondition");
		if(condition == 0) {
			showConditionSpan.innerHTML = "请输入你想要查询的发帖人的姓名:";
		} else if(condition == 1) {
			showConditionSpan.innerHTML = "请输入你想要查询的回帖人的姓名:";
		} else if(condition == 4) {
			showConditionSpan.innerHTML = "请输入你想要查询的帖子的标题:";
		} else if(condition == 5) {
			showConditionSpan.innerHTML = "请输入你想要查询的帖子的内容:";
		} 
	}
</script>
<body>
	<div id="rightWraper">
		<div class="text">
			<form id="serachForm" action="SerachPublishDO" method="post">
      		帖子搜索:<br/>
				<select name="condition" id="condition" onchange="changeCondition()"> 
					<option  value=5 >根据帖子内容搜索</option>
					<option  value=4 >根据帖子标题搜索</option>
					<option  value=1 >根据回帖人搜索</option>
					<option  value=0 selected>根据发帖人搜索</option>
				</select>									
			<br/><br/>
			<span id="showCondition">请输入你想要查询的发帖人的姓名:</span><input type="text" name="key" id="key" />
			<input type="submit" value="搜索">
	</form>
		</div>
	 <div>
	 ${publish.publishMan.name}
		<table border="1" cellSpacing=0 cellPadding=3 width=98%>
						<tr align="center" height="28px">
							<td width="8%">
								ID
							</td>
							<td width="15%" align="left">
								标题
							</td>
							<td width="10%">
								内容
							</td>
							<td width="12%">
								发题人
							</td>
							<td width="15%">
								发帖时间 
							</td>
						</tr>
						<c:forEach items="${sessionScope.serachPublisnList}" var="publish">
							<tr align="center" height="28px">
								<td>
									${publish.id}
								</td>
								<td>
									${publish.title}
								</td>
								<td>
									${publish.content}
								</td>
								<td>
									${publish.publishMan.name}
								</td>
								<td>
									${publish.publishDate}
								</td>
							</tr>
						</c:forEach>
					</table>
				</div>
			<!-- <table width="50%" border="1" align="center">
				<tr>
					<td>作者</td>
					<td>标题</td>
					<td>发表日期</td>
					<td>帖子人气</td>
				</tr>
				<tr>
					<td>钟上星</td>
					<td>不晓得</td>
					<td>2008-07-09</td>
					<td>5</td>
				</tr>
				<tr>
					<td>李旭</td>
					<td>贱人</td>
					<td>2008-09-15</td>
					<td>9</td>
				</tr>
				<tr>
					<td>蔡林</td>
					<td>你说了算</td>
					<td>2008-09-23</td>
					<td>4</td>
				</tr>
			</table>
		</div>-->
		
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -