这样显示代码要怎么样写:
显不内容:
1。老大哥 2。addanli.asp 3。addanli.asp1 4。addanli.asp
5。addanli.as 6。addanli.asp 7。addanli.asp 8。addanli.asp
。。。。。。。
如果有100条记录 每页显示33条 要怎么写?
[此贴子已经被作者于2005-11-19 9:47:46编辑过]
[此贴子已经被作者于2005-11-19 10:16:13编辑过]
<%
dim top,botten
set rs=server.createobject("adodb.recordset")
sql="select * from anli order by id desc"
rs.open sql,conn,1,1
Response.Write"<table width='100%' border='0' cellspacing='0' cellpadding='0' bgcolor='#ffffff'><tr><td> 最新更新情况,截止到"&date()&"共有<b> "&rs.RecordCount&" </b>张照片</td></tr></table>"
top=1
if rs.bof and rs.eof then
response.write "没有任何图片"
else
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
rs.PageSize=9 '每页显示num条记录
pageNum=rs.PageCount '共pageNum页
showpage=1 '显示第showpage页
If Not IsNumeric(request("showpage")) Then
showpage=1
else
showpage=Int(request("showpage"))
End if
If showpage<1 Then showpage=1 End If
If showpage>pageNum Then showpage=pageNum End If
rs.AbsolutePage=showpage '当前显示页等于showpage
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
response.write "<table border='0' cellspacing='1' cellpadding='3'><center>"
do while not rs.eof
for botten=1 to 4
if rs.eof then exit for
%>
<td bgcolor="#CAE2F8" width="200" >
<A href="view.asp?id=<%=rs("id")%>" target="_blank"><%=rs("site")%></a> </td>
<%
rs.movenext
top=top+1
next
Response.Write"</tr>"
if top>60 then exit do
loop
end if
Response.Write"</table>"
%>
<%
response.Write(" <a href='zhensi.asp?showPage=1' title='第一页'><FONT face=webdings>9</FONT></a> ")
for j=1 to pageNum
if showpage=j then
response.Write("<a href='zhensi.asp?showPage="&j&"'><font class='underline'>"&j&"</font></a> ")
else response.Write("<a href='zhensi.asp?showPage="&j&"'>"&j&"</a> ")
end if
next
response.Write("<a href='zhensi.asp?showPage="&pageNum&"' title='最后一页'><FONT face=webdings>:</FONT></a>")
%>
[此贴子已经被作者于2005-11-19 10:41:23编辑过]