http://ossweb-img.qq.com/time/AllNews/toplist_all.htm
具体的后台什么的你自己做吧
----------------------------------------------
对不起哦,我只负责提供思想……
数据库中的表你只要设计三列,第一列是链接前面的小图标,第二列是连接地址,第三列是显示的文字。然后弄个循环把这三项读取出来显示就行了。
<%set rs=server.createobject("adodb.recordset")
rs.open ("select top 1 * from gonggao order by id desc"),conn,1,1
%>
<marquee><%=rs("内容")%></marquee>
<tablewidth="250"
id="mytalbe"
style="background:
url('images/b.gif')
">
<%
WebApplicationContext
wac
=
WebApplicationContextUtils
.getWebApplicationContext(this.getServletContext())
INoticeboardService<Noticeboard>
noticeboardSer
=
(INoticeboardService)
wac
.getBean("noticeboardService")
List<Noticeboard>
noticeboradList
=
noticeboardSer
.list("From
Noticeboard
as
n
order
by
id
desc")
//此处你取出的是
第1条数据
所以只显示一条,显示多条
应该将此注释
//Noticeboard
nb
=
noticeboradList.get(0)
%>
<tr>
<td>
<marquee
direction="up"
height="300"
onmouseout="this.start()"
onMouseOver="this.stop()"
scrollamount="2">
<%
//循环将消息显示
for(int
i=0i<noticeboradList.size()i++){
Noticeboard
nb
=
noticeboradList.get(i)
%>
<%=nb.getContent()%>
<br/>
<%
}
%>
</marquee>
</td>
</tr>
</table>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)