?? search.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 + -