高手进来看看这段代码!

wdmcsoft 2004-03-06 04:54:10
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body><% if request("pageno")=""then
pageno=1
else
pageno=request("pageno")
end if
set conn=server.createobject("adodb.connection")
conn.open"driver=microsoft access driver (*.mdb);dbq="&Server.MapPath("upload.mdb")
set rs=server.createobject("adodb.recordset")
rs.open "select * from info order by id desc",conn,1,3
rs.pagesize=5
if rs.eof then
pageno=0
else
rs.absolutepage=pageno
end if
x=0
for x=1 to rs.pagesize
if rs.eof then
exit for
else%>
<table width="600" height="25" border="0" align="center" cellpadding="0" cellspacing="0" class="lybox">
<%do while not rs.eof %><tr>
<%for i= 1 to 3
if not rs.eof then %>
<td width="200"> <div align="center"><img src="<% =rs("filepath")%>" width="200" height="200"></div></td>
<%rs.movenext
else %>
<td><%response.write"暂时还没有照片"%></td>
<%end if
next %></tr>
<%loop%>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="29"> <div align="center"><span class="lyfont">共<%=rs.recordcount%>条留言,第<%=PageNo%>页/共<%=Int(rs.pagecount)%>页,</span>
<span class="lyfont">每页<%=rs.Pagesize%>条记录。</span><span lang="zh-cn"><a href="try/xdck.asp?PageNo=1" class="a">首页</a>
<%If PageNo > 1 then
%>
<a href="try/xdck.asp?PageNo=<%=PageNo-1%>" class="a">上一页</a>
<%
Else
response.write " "
End If
If int(PageNo)<>Int(rs.pagecount) then%>
<a href="try/xdck.asp?PageNo=<%=PageNo+1%>" class="a">下一页</a>
<%Else
response.write " "
End If %>
<a href="try/xdck.asp?PageNo=<%=Int(rs.pagecount)%>" class="a">尾页</a>
<%rs.close%></span></div></td>
</tr>
</table>
</tr>
</body>
</html>
...全文
28 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
liuyangxuan 2004-04-27
  • 打赏
  • 举报
回复
接分。
liuyangxuan 2004-04-27
  • 打赏
  • 举报
回复
呵,楼主聪明接分!·

28,391

社区成员

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

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