asp(急,在线等)
这里是一个留言簿的分页程序,但是其中的<%
icount=0
do while not rs.eof and icount<rs.pagesize
icount=icount+1
%>
不知道是什么意思,请各位大虾帮忙解释一下。谢谢。
<%
dim conn
dim connstr
dim rs
set conn=server.createobject("ADODB.CONNECTION")
connstr="DBQ="+server.mappath("guest1.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
conn.open connstr
Set rs=server.createobject("ADODB.RECORDSET")
rs.open "select * from guest order by id desc",conn,1,1
if rs.bof and rs.eof then
repose.write("没有纪录")
else
end if
rs.pagesize=5
%>
<form Action="allmsg4.asp" Method="GET" align="right">
<p>留言簿共有
<font size=5 color=red>
<%=rs.recordcount %>
</font>
笔纪录
<%
Page = CLng(Request("Page")) ' CLng 不可省略
If Page < 1 Then Page = 1
If Page > rs.PageCount Then Page = rs.PageCount
rs.absolutePage=page
%>
<form Action="allmsg4.asp" Method="GET" align="right">
<%
If Page <> 1 Then
Response.Write "<A HREF=allmsg4.asp?Page=1>第一页</A>"
Response.Write "<A HREF=allmsg4.asp?Page=" & (Page-1) & ">上一页</A>"
End If
If Page <> rs.PageCount Then
Response.Write "<A HREF=allmsg4.asp?Page=" & (Page+1) & ">下一页</A>"
Response.Write "<A HREF=allmsg4.asp?Page=" & rs.PageCount & ">最后一页</A>"
End If
%> 页数:<font COLOR="Red"><%=Page%>/<%=rs.PageCount%></font> </p>
</form>
<%
icount=0
do while not rs.eof and icount<rs.pagesize
icount=icount+1
%>
<table border=1 >
<tr>
<td bgcolor=lightyellow width=100><b>姓名:</b>
<td bgcolor=lightyellow width=100><b><% =rs("name")%></b></td>
<td bgcolor=lightyellow width=100><b>邮件:</b>
<td bgcolor=lightyellow width=100><b><% =rs("mail")%></b></td>
<td bgcolor=lightyellow width=100><b>日期:</b>
<td bgcolor=lightyellow width=100><b><% =rs("date1")%></b></td>
<td bgcolor=lightyellow width=200><b>IP:</b>
<td bgcolor=lightyellow width=200><b><% =rs("ip")%></b></td>
</tr>
<tr><td bgcolor=lightyellow><b>留言标题:</b>
<td colspan=7 width=700><b><% =rs("subject")%></b></td>
</tr>
<tr><td bgcolor=lightyellow><b>留言内容:</b>
<td colspan=7 width=700><b><% =rs("liuyan")%></b></td>
</tr>
<table width="100%" border="0" height="21" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<br>
<%
rs.movenext
loop
%>
</table>
<%rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</table>
icount=0
do while not rs.eof and icount<rs.pagesize
icount=icount+1
%>
不知道是什么意思,请各位大虾帮忙解释一下。谢谢。
<%
dim conn
dim connstr
dim rs
set conn=server.createobject("ADODB.CONNECTION")
connstr="DBQ="+server.mappath("guest1.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
conn.open connstr
Set rs=server.createobject("ADODB.RECORDSET")
rs.open "select * from guest order by id desc",conn,1,1
if rs.bof and rs.eof then
repose.write("没有纪录")
else
end if
rs.pagesize=5
%>
<form Action="allmsg4.asp" Method="GET" align="right">
<p>留言簿共有
<font size=5 color=red>
<%=rs.recordcount %>
</font>
笔纪录
<%
Page = CLng(Request("Page")) ' CLng 不可省略
If Page < 1 Then Page = 1
If Page > rs.PageCount Then Page = rs.PageCount
rs.absolutePage=page
%>
<form Action="allmsg4.asp" Method="GET" align="right">
<%
If Page <> 1 Then
Response.Write "<A HREF=allmsg4.asp?Page=1>第一页</A>"
Response.Write "<A HREF=allmsg4.asp?Page=" & (Page-1) & ">上一页</A>"
End If
If Page <> rs.PageCount Then
Response.Write "<A HREF=allmsg4.asp?Page=" & (Page+1) & ">下一页</A>"
Response.Write "<A HREF=allmsg4.asp?Page=" & rs.PageCount & ">最后一页</A>"
End If
%> 页数:<font COLOR="Red"><%=Page%>/<%=rs.PageCount%></font> </p>
</form>
<%
icount=0
do while not rs.eof and icount<rs.pagesize
icount=icount+1
%>
<table border=1 >
<tr>
<td bgcolor=lightyellow width=100><b>姓名:</b>
<td bgcolor=lightyellow width=100><b><% =rs("name")%></b></td>
<td bgcolor=lightyellow width=100><b>邮件:</b>
<td bgcolor=lightyellow width=100><b><% =rs("mail")%></b></td>
<td bgcolor=lightyellow width=100><b>日期:</b>
<td bgcolor=lightyellow width=100><b><% =rs("date1")%></b></td>
<td bgcolor=lightyellow width=200><b>IP:</b>
<td bgcolor=lightyellow width=200><b><% =rs("ip")%></b></td>
</tr>
<tr><td bgcolor=lightyellow><b>留言标题:</b>
<td colspan=7 width=700><b><% =rs("subject")%></b></td>
</tr>
<tr><td bgcolor=lightyellow><b>留言内容:</b>
<td colspan=7 width=700><b><% =rs("liuyan")%></b></td>
</tr>
<table width="100%" border="0" height="21" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<br>
<%
rs.movenext
loop
%>
</table>
<%rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</table>
...全文
相关推荐
在线传讯 asp(绝对可以运行,很实用的。)
一个比较简单却也很实用的小asp实例。急着交作业的你们,绝对用的上!!
在线教育 asp.net源码
BN066-在线教育 asp.net源码 无密码
asp 在线考试系统asp 在线考试系统
asp 在线考试系统asp 在线考试系统asp 在线考试系统asp 在线考试系统asp 在线考试系统asp 在线考试系统asp 在线考试系统
asp 在线编辑器,asp 在线编辑器
asp在线编辑器,是学习asp高级应用中的东西,主要用于BBs、Blog和新闻发布系统。本包包含三个经典的Asp在线编辑器。
ASP在线解压工具\ASP在线解压工具\ASP在线解压工具
软件很小的,使用也很简单. 简要说明一下: 1.点第一个框,选择要压缩的目录; 2.点Browse,选择存放路径(制作出来的文件保存在哪) 3.文件命名. 制作出来一个.bat 和 setup.asp 文件. 上传到你的ASP空间中.2个文件必须在同一目录下. 然后在IE里运行http://你的网址/目录名/setup.asp 就可以解开了.


