📄 bbs.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK"
pageEncoding="GBK"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>海角论坛</title>
<script type="text/javascript">
function chaBT(){
var biaoti=document.getElementById("biaoti").value.replace(/\s/g,"");
if(biaoti==""){
alert("请输入标题所对应的关键字!");
return;
}
window.location.href="bbs?biaoti="+biaoti+"&flag=BT";
}
function chaSJ(){
var shijian=document.getElementById("shijian").value.replace(/\s/g,"");
if(shijian==""){
alert("请选择时间!");
return;
}
window.location.href="bbs?shijian="+shijian+"&flag=SJ";
}
function fatie(){
window.open("faTie.jsp", "_blank")
}
function flush(){
window.self.location="bbs?flag=SY";
}
</script>
</head>
<body>
<jsp:useBean id="user" type="bbs.ahut.javabean.UserBean" scope="session"/>
<div><font size="3.5"><strong><font color=color="#008000"><font color="#008000"><jsp:getProperty name="user" property="username" /></font><font color="#008000">你好!以下为论坛信息:</font><br></font></strong></font></div>
<div align="right">
<input type="text" id="biaoti"><input type="button" value="按标题查找" onclick="chaBT()" style="background-color: rgb(192, 192, 192);">
<select id="shijian">
<option value=" ">请选择时间</option>
<option value="1">最近一天</option>
<option value="3">最近三天</option>
<option value="5">最近五天</option>
<option value="7">最近七天</option>
<option value="9">最近九天</option>
</select>
<input type="button" value="按时查找" onclick="chaSJ()" style="background-color: rgb(192, 192, 192);">
</div>
<hr style="border:2px double #e8e8e8"/>
<div align="center">
<table width="800" bgcolor="#c0c0c0">
<tr><td ><font color="#0000a0">以下为最新帖子你可以点击主题查看并发表评论</font></td></tr>
</table>
<table width="800">
<tr bgcolor="#f0f0ff">
<td><font color="#400040" size="3"><strong>主题</strong></font></td>
<td><font color="#400040" size="3"><strong>作者</strong></font></td>
<td><font color="#400040" size="3"><strong>发表时间</strong></font></td>
<td><font color="#400040" size="3"><strong>查看内容</strong></font></td>
</tr>
<%
java.sql.ResultSet rs=(java.sql.ResultSet)request.getAttribute("zhuTie");
while(rs.next()){
String id=rs.getString("id");
String username=rs.getString("username");
String title=rs.getString("title");
String createTime=rs.getString("createTime");
%>
<tr bgcolor="#f0f9ff">
<td><font color="#008080"><%=title%></font><br></td>
<td><%=username%></td>
<td><%=createTime%></td>
<td><a href="listTie?id=<%=id%>" target="_blank">进入</a></td>
</tr>
<%}%>
</table><hr style="border:2px double #e8e8e8"/>
<table width="800" height="57">
<tr>
<td ><input type="button" value="我要发帖" onclick="fatie()" style="background-color: rgb(128, 255, 128);"></td>
<td ><input type="button" value="刷新页面" onclick="flush()" style="background-color: rgb(128, 255, 128);"></td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -