notice.jsp
来自「JSP程序设计案例 (Easy_Buy在线购物系统)」· JSP 代码 · 共 35 行
JSP
35 行
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="shopBeans.ConnDB" %>
<%@ page import="java.io.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.sql.*"%>
<table width="180" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="184" height="30" align="center" bgcolor="#99CCFF"><span class="STYLE2">公告栏</span></td>
</tr>
<%
ConnDB non=new ConnDB();
String nsql="select n_message from notice";
String notice="";
String nsum="";
ResultSet nrs=non.doQuery(nsql);
int count=1;
while(nrs.next())
{
notice =nrs.getString("n_message");
nsum=nsum+"<br><Br>公告"+String.valueOf(count)+": "+notice;
count++;
}
%>
<tr>
<td height="70" align="center"><span class="STYLE1" style="color: #000000">
<marquee direction=up height=100 id=m onmouseout=m.start() onMouseOver=m.stop() scrollamount=2 align="center">
<%= nsum %>
</marquee>
</span></td>
</tr>
</table>
<% non.closeConnection(); %>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?