searchaffichebytime.jsp

来自「购物网站」· JSP 代码 · 共 40 行

JSP
40
字号
<%@ page contentType="text/html; charset=gb2312" language="java" import="com.*,java.util.*,java.io.*" errorPage="error.jsp" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<jsp:useBean id="affichebean" class="com.AfficheBean" scope="page"/>
<body>
<center>
<%String afficheTime=request.getParameter("afficheTime");%>
<h1>查看时间为<font color=red><%=afficheTime%></font>的公告</h1>
<table width=80% border="1" bgcolor="#0099CC">
<tr bgcolor="#009966" bordercolor="#990066">
<td>id</td><td>内容</td><td>时间</td>
</tr>
<%
Collection affiche=affichebean.getAfficheByTime(afficheTime);
Iterator it=affiche.iterator();
while(it.hasNext())
{
    Affiche temp=(Affiche)it.next();
	out.println("<tr bordercolor=#990066>");
	out.println("<td>"+temp.getAfficheId()+"</td>");
	out.println("<td>"+temp.getAfficheNews()+"</td>");
	try
   {
		out.println("<td>"+temp.getAfficheTime()+"</td>");
		
	}
    catch(Exception e)
   {}
	out.println("</tr>");
}

%>
</table>
<a href="affiche.html">返回</a>
</center>
</body>
</html>

⌨️ 快捷键说明

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