数字排行。

hotbug2002 2003-09-13 07:01:45
在排行榜上如何使用在网页中的歌名前面用1,2,3表示序号,歌名用的数据库中数据,然后用服务器行为,重复项为10,请用什么表示?
例如:1 小鸟
2 大鸟
3 中鸟
...全文
35 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
wanghr100 2003-09-13
  • 打赏
  • 举报
回复
加个循环就行了啦.
for i=1 to 10
next

<%
sql1="select top 10 articleid,title,dateandtime,hits from learning order by hits DESC"
Set rstop= Server.CreateObject("ADODB.Recordset")
rstop.open sql1,conn,1,1
do until rstop.eof
for i=1 to 10
%>
<tr>
<td height="19"><img height=16
src="images/make/arrow.gif" width=16 border=0><a href="javascript:popwin2(<%=rstop("articleid")%>)"><%=i%><%=rstop("title")%><%=formatdatetime(rstop("dateandtime"),2)%></a></td>
<%

rstop.movenext
next
loop
%>
zorou_fatal 2003-09-13
  • 打赏
  • 举报
回复
用一个变量count
比如你的rst 的pagesize为10
那就
count=0
for i=0 to pagesize-1
count=count+1
response.write count&rst("songname")
rst.movenext
next

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧