ASP循环输出显示和分页问题!!
<TABLEheight=242cellSpacing=0cellPadding=0width=949border=0><TBODY><%setrs=server.Cre...
<TABLE height=242 cellSpacing=0 cellPadding=0 width=949 border=0>
<TBODY>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from pic"
rs.open sql,conn,1,1
%>
<TR>
<%
i=1
while not rs.eof
%>
<%if i mod 4 = 0 then %><TR><%end if%>
<TD align=middle> <table width="37" height="103" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="padding-left:10px; padding-right:10px;"><a href='index.asp?Picname=<%=rs("Picname")%>' style="font-weight:bold; color:#000000;"><img src="213.jpg" width="216" height="120" border="0" /></a></td>
</tr>
<tr>
<td align="center" valign="bottom" style="padding-left:10px; padding-right:10px;"><%=rs("PicTitle")%></a></td>
</tr>
</table></TD>
<%
i=i+1
rs.movenext
wend
%>
</TBODY></TABLE>
现在是每行显示4个,第一行会显示三个出来.从第二行开始才会显示4个.
希望高手能帮下.
另外分页我写不好.
怎么写才能写出分页的效果为首页 上一页 下一页 尾页
希望高手也能帮一下.最好能写上注释.我也好依葫芦画瓢~
谢谢啦!没分了!现在就6分!问问题问完了.希望能帮下忙!谢谢啦! 展开
<TBODY>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from pic"
rs.open sql,conn,1,1
%>
<TR>
<%
i=1
while not rs.eof
%>
<%if i mod 4 = 0 then %><TR><%end if%>
<TD align=middle> <table width="37" height="103" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="padding-left:10px; padding-right:10px;"><a href='index.asp?Picname=<%=rs("Picname")%>' style="font-weight:bold; color:#000000;"><img src="213.jpg" width="216" height="120" border="0" /></a></td>
</tr>
<tr>
<td align="center" valign="bottom" style="padding-left:10px; padding-right:10px;"><%=rs("PicTitle")%></a></td>
</tr>
</table></TD>
<%
i=i+1
rs.movenext
wend
%>
</TBODY></TABLE>
现在是每行显示4个,第一行会显示三个出来.从第二行开始才会显示4个.
希望高手能帮下.
另外分页我写不好.
怎么写才能写出分页的效果为首页 上一页 下一页 尾页
希望高手也能帮一下.最好能写上注释.我也好依葫芦画瓢~
谢谢啦!没分了!现在就6分!问问题问完了.希望能帮下忙!谢谢啦! 展开
4个回答
展开全部
<TABLE height=242 cellSpacing=0 cellPadding=0 width=949 border=0>
<TBODY>
<%
MaxPerPage=20
page=request("page")
if isnumeric(page)=false then
page=1
end if
page=cint(page)
if page<1 then page=1
set rs=server.CreateObject("adodb.recordset")
sql="select * from pic"
rs.open sql,conn,1,1
rs.PageSize=MaxPerPage
TotalPage=rs.PageCount
rs.AbsolutePage=page
i=0
do while not rs.eof
%>
<%if i mod 4 = 0 then %><TR><%end if%>
<TD align=middle> <table width="37" height="103" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="padding-left:10px; padding-right:10px;"><a href='index.asp?Picname=<%=rs("Picname")%>' style="font-weight:bold; color:#000000;"><img src="213.jpg" width="216" height="120" border="0" /></a></td>
</tr>
<tr>
<td align="center" valign="bottom" style="padding-left:10px; padding-right:10px;"><a href='index.asp?Picname=<%=rs("Picname")%>' style="font-weight:bold; color:#000000;"><%=rs("PicTitle")%></a></td>
</tr>
</table></TD>
<%if i mod 4 = 3 then %></TR><%end if%>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<tr align="right">
<td height="23" colspan="4">
<%if page>1 then%>
<a href="?page=1">首页</a> <a href="?page=<%=page-1%>">上一页</a> |
<%else%>
首页 上一页 |
<%end if%>
<%if page<TotalPage then%>
<a href="?page=<%=page+1%>">下一页</a> <a href="?page=<%=TotalPage%>">尾页</a>
<%else%>
下一页 尾页
<%end if%>
共<%=rs.recordcount%>条留言</td>
</tr>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</TBODY></TABLE>
<TBODY>
<%
MaxPerPage=20
page=request("page")
if isnumeric(page)=false then
page=1
end if
page=cint(page)
if page<1 then page=1
set rs=server.CreateObject("adodb.recordset")
sql="select * from pic"
rs.open sql,conn,1,1
rs.PageSize=MaxPerPage
TotalPage=rs.PageCount
rs.AbsolutePage=page
i=0
do while not rs.eof
%>
<%if i mod 4 = 0 then %><TR><%end if%>
<TD align=middle> <table width="37" height="103" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="padding-left:10px; padding-right:10px;"><a href='index.asp?Picname=<%=rs("Picname")%>' style="font-weight:bold; color:#000000;"><img src="213.jpg" width="216" height="120" border="0" /></a></td>
</tr>
<tr>
<td align="center" valign="bottom" style="padding-left:10px; padding-right:10px;"><a href='index.asp?Picname=<%=rs("Picname")%>' style="font-weight:bold; color:#000000;"><%=rs("PicTitle")%></a></td>
</tr>
</table></TD>
<%if i mod 4 = 3 then %></TR><%end if%>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<tr align="right">
<td height="23" colspan="4">
<%if page>1 then%>
<a href="?page=1">首页</a> <a href="?page=<%=page-1%>">上一页</a> |
<%else%>
首页 上一页 |
<%end if%>
<%if page<TotalPage then%>
<a href="?page=<%=page+1%>">下一页</a> <a href="?page=<%=TotalPage%>">尾页</a>
<%else%>
下一页 尾页
<%end if%>
共<%=rs.recordcount%>条留言</td>
</tr>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</TBODY></TABLE>
展开全部
建立access的数据库news,还有表news,表的字段(id,title),id唯一,输入数据保存,用下面代码可查询,可分页
-----------------------下面保存为search.asp--------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文件</title>
</head>
<body bgcolor="#ffffff">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<script>
function btn_ck_bh_Click()
{
var cx = document.form1.cxsj.value;
form1.action ="search.asp?cx="+cx;
}
</script>
<table border="1" cellspacing="0" bgcolor="#F0F8FF" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" width="88%" style="word-break:break-all">
<tr>
<td width="778" align="center" colspan="7">
<form method="POST" name="form1" action=search.asp>
<p>输入搜索内容:<input type="text" name="cxsj" size="20"><input type="submit" value="提交" name="B1" LANGUAGE="javascript" onclick="btn_ck_bh_Click()">
<input type="reset" value="重写" name="B2"></p>
</form>
</td>
</tr>
</table>
<table border="1" cellspacing="0" bgcolor="#F0F8FF" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" width="88%" style="word-break:break-all">
<tr>
<td width="8%" align="center"><strong><font color="#0080C0">ID 号</font></strong></td>
<td width="58%" align="center"><strong><font color="#0080C0">标 题</font></strong></td>
<td width="8%" align="center"><strong><font color="#0080C0">修 改</font></strong></td>
<td width="8%" align="center"><strong><font color="#0080C0">删 除</font></strong></td>
</tr>
<%
'数据库查询
'获得搜索内容
cx = request("cx")
dim pageCount
'把page转换成整数
page = cint(request("page"))
set conn=server.createobject("adodb.connection")'
set rs=server.createobject("adodb.recordset")
conn.open "DBQ=" & server.mappath("./news.mdb") & ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
' 获取产品的名字记录集(从 news表中)
if cx <> "" then
sql = "select * from news where title like '%"&cx& "%' order by id desc"
else
sql ="select * from news order by id desc"
end if
rs.open sql,conn,3,3
'如果没有数据记录
if rs.bof then
errmsg=errmsg+"<br>"+"<li>"+keyword+"没有记录,请返回!!"
response.write errmsg
response.end
end if
' 设置记录集在每页的总行数,也就是 PageSize属性
RS.PageSize=40
'把rs.pageCount转换成整数和page才能作比较
pageCount = cint(rs.pageCount)
' 设置当前的页号( AbsolutePage属性)
if page = 0 then
page =1
end if
RS.AbsolutePage = page
x=1
' 显示当前页中的所有记录( PageSize中设置的行数)
WHILE NOT RS.EOF AND NumRows<RS.PageSize
%>
<tr onmouseover="this.bgColor='#99ccff'" onmouseout="this.bgColor=''">
<td width="8%"><p align="center"><%=rs("id")%></td>
<td width="58%"><a href="view.asp?id=<%=rs("id")%>" target="_blank"><%=rs("title")%></a></td>
<td width="8%" align="center"><a href="edit.asp?id="<%=rs("id")%>>修 改</a></td>
<td width="8%" align="center"><a href="delet.asp?id="<%=rs("id")%>>删 除</a></td>
</tr>
<%RS.MoveNext
NumRows=NumRows+1
WEND%>
<tr onmouseover="this.bgColor='#99ccff'" onmouseout="this.bgColor=''">
<td width="105%" align="center" colspan="6"> </td> </tr>
<tr>
<td width="105%" align="center" colspan="6">
<p align="center"><FONT color=#333333>共<%=PageCount%>页 第<%=page%>页★
<%if page=1 then%>首页<%end if%>
<%if page>1 then%>
<A HREF="search.asp?page=1&cx=<%=cx%>"> 首页</A>
<%end if%>★
<%if page>1 then%><A HREF="search.asp?page=<%=page-1%>&cx=<%=cx%>"><%end if%>上一页</a>
<%
dim pagewhere
dim p
p = 1
'把pagewhere转换成整数
'pagewhere = cint(request("pagewhere"))
pagewhere = pageCount
if pagewhere>0 then
for p=1 to pagewhere
if p <> page then%>
<A HREF="search.asp?page=<%=p%>&cx=<%=cx%>"><%=p%></a>
<%end if
if p =page then%>
<%=p%>
<% end if
next
end if%>
<%if page < PageCount then%>
<A HREF="search.asp?page=<%=page+1%>&cx=<%=cx%>">
<%end if %>下一页</A>★
<%if page=PageCount then%>尾页
<%end if%>
<%if page<PageCount then%>
<A HREF="search.asp?page=<%=PageCount%>&cx=<%=cx%>"> 尾页</A>
<%end if%>
</p></FONT></td> </tr> <tr>
<td width="105%" align="center" colspan="6">搜索内容:<%=cx%></td>
</tr>
</table></center></div>
</body></html>
<%
rs.close
Set rs=nothing
conn.close
set conn=nothing
%>
-----------------------下面保存为search.asp--------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文件</title>
</head>
<body bgcolor="#ffffff">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<script>
function btn_ck_bh_Click()
{
var cx = document.form1.cxsj.value;
form1.action ="search.asp?cx="+cx;
}
</script>
<table border="1" cellspacing="0" bgcolor="#F0F8FF" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" width="88%" style="word-break:break-all">
<tr>
<td width="778" align="center" colspan="7">
<form method="POST" name="form1" action=search.asp>
<p>输入搜索内容:<input type="text" name="cxsj" size="20"><input type="submit" value="提交" name="B1" LANGUAGE="javascript" onclick="btn_ck_bh_Click()">
<input type="reset" value="重写" name="B2"></p>
</form>
</td>
</tr>
</table>
<table border="1" cellspacing="0" bgcolor="#F0F8FF" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" width="88%" style="word-break:break-all">
<tr>
<td width="8%" align="center"><strong><font color="#0080C0">ID 号</font></strong></td>
<td width="58%" align="center"><strong><font color="#0080C0">标 题</font></strong></td>
<td width="8%" align="center"><strong><font color="#0080C0">修 改</font></strong></td>
<td width="8%" align="center"><strong><font color="#0080C0">删 除</font></strong></td>
</tr>
<%
'数据库查询
'获得搜索内容
cx = request("cx")
dim pageCount
'把page转换成整数
page = cint(request("page"))
set conn=server.createobject("adodb.connection")'
set rs=server.createobject("adodb.recordset")
conn.open "DBQ=" & server.mappath("./news.mdb") & ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
' 获取产品的名字记录集(从 news表中)
if cx <> "" then
sql = "select * from news where title like '%"&cx& "%' order by id desc"
else
sql ="select * from news order by id desc"
end if
rs.open sql,conn,3,3
'如果没有数据记录
if rs.bof then
errmsg=errmsg+"<br>"+"<li>"+keyword+"没有记录,请返回!!"
response.write errmsg
response.end
end if
' 设置记录集在每页的总行数,也就是 PageSize属性
RS.PageSize=40
'把rs.pageCount转换成整数和page才能作比较
pageCount = cint(rs.pageCount)
' 设置当前的页号( AbsolutePage属性)
if page = 0 then
page =1
end if
RS.AbsolutePage = page
x=1
' 显示当前页中的所有记录( PageSize中设置的行数)
WHILE NOT RS.EOF AND NumRows<RS.PageSize
%>
<tr onmouseover="this.bgColor='#99ccff'" onmouseout="this.bgColor=''">
<td width="8%"><p align="center"><%=rs("id")%></td>
<td width="58%"><a href="view.asp?id=<%=rs("id")%>" target="_blank"><%=rs("title")%></a></td>
<td width="8%" align="center"><a href="edit.asp?id="<%=rs("id")%>>修 改</a></td>
<td width="8%" align="center"><a href="delet.asp?id="<%=rs("id")%>>删 除</a></td>
</tr>
<%RS.MoveNext
NumRows=NumRows+1
WEND%>
<tr onmouseover="this.bgColor='#99ccff'" onmouseout="this.bgColor=''">
<td width="105%" align="center" colspan="6"> </td> </tr>
<tr>
<td width="105%" align="center" colspan="6">
<p align="center"><FONT color=#333333>共<%=PageCount%>页 第<%=page%>页★
<%if page=1 then%>首页<%end if%>
<%if page>1 then%>
<A HREF="search.asp?page=1&cx=<%=cx%>"> 首页</A>
<%end if%>★
<%if page>1 then%><A HREF="search.asp?page=<%=page-1%>&cx=<%=cx%>"><%end if%>上一页</a>
<%
dim pagewhere
dim p
p = 1
'把pagewhere转换成整数
'pagewhere = cint(request("pagewhere"))
pagewhere = pageCount
if pagewhere>0 then
for p=1 to pagewhere
if p <> page then%>
<A HREF="search.asp?page=<%=p%>&cx=<%=cx%>"><%=p%></a>
<%end if
if p =page then%>
<%=p%>
<% end if
next
end if%>
<%if page < PageCount then%>
<A HREF="search.asp?page=<%=page+1%>&cx=<%=cx%>">
<%end if %>下一页</A>★
<%if page=PageCount then%>尾页
<%end if%>
<%if page<PageCount then%>
<A HREF="search.asp?page=<%=PageCount%>&cx=<%=cx%>"> 尾页</A>
<%end if%>
</p></FONT></td> </tr> <tr>
<td width="105%" align="center" colspan="6">搜索内容:<%=cx%></td>
</tr>
</table></center></div>
</body></html>
<%
rs.close
Set rs=nothing
conn.close
set conn=nothing
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
ASP初级程序员基本技能--数字分页显示
数据库mdb内容:表名=Diary;字段1=DiaryID int;字段2=DiaryName nvarchar;字段3=DiaryDate datetime
<%
'On Error Resume Next
Set Conn=Server.CreateObject("ADODB.Connection")
'ConnStr="Provider=SQLOLEDB;Data Source=Chinadad;Initial Catalog=Chinadad;UID=sa;PWD=;"
'ConnStr="Driver={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("\")&"\Diary.mdb"
ConnStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("\")&"\Diary.mdb"
''Response.Write ConnStr&"<hr>"
Conn.Open ConnStr
Set Rs=Server.CreateObject("ADODB.Recordset")
sql="Select * from Diary order by DiaryID desc"
Rs.Open sql,Conn,1,1
n=0
if not rs.eof then
PageSize=10
Rs.PageSize=PageSize
RecordCount=Rs.RecordCount
PageNo=Request("PageNo")
if PageNo="" then
PageNo=1
elseif PageNo<=0 then
PageNo=1
else
PageNo=cint(PageNo)
if PageNo>rs.PageCount then PageNo=rs.PageCount
end if
Rs.AbsolutePage=cint(PageNo)
%>
<form method=post action="<%=Request.ServerVariables("Script_Name")%>">
<%for i=1 to PageSize
Response.Write (PageNo*PageSize+n)&"行-->"&rs("DiaryID")&"."&rs("DiaryName")&rs("DiaryDate")&"<hr>"%>
<%rs.movenext
if rs.eof then exit for
n=n+1%>
<%next%>
<%=n%>
<a href="?PageNo=1">首页</a> <%if PageNo>1 then%><a href="?PageNo=<%=PageNo-1%>">上页</a><%else%>上页<%end if%>
<%for i=0 to PageSize-1%>
<%if PageNo+1>=int(PageNo/PageSize)*PageSize then%><a href="?PageNo=<%=int(PageNo/PageSize)*PageSize+i%>">[<%=int(PageNo/PageSize)*PageSize+i%>]</a><%end if%>
<%next%>
<%if PageNo+1<Rs.PageCount+1 then%><a href="?PageNo=<%=PageNo+1%>">下页</a><%else%>下页<%end if%> <a href="?PageNo=<%=Rs.PageCount%>">尾页</a>
<input type="text" name="pageno" value=""><input type="submit" name="submit" value="转到页面">
</form>
<p>
<%end if
if Err.Number<>0 then
Response.Write "数据库连接失败:"&Err.Description
else
Response.Write "数据库连接成功:"&ConnStr
end if
%>
数据库mdb内容:表名=Diary;字段1=DiaryID int;字段2=DiaryName nvarchar;字段3=DiaryDate datetime
<%
'On Error Resume Next
Set Conn=Server.CreateObject("ADODB.Connection")
'ConnStr="Provider=SQLOLEDB;Data Source=Chinadad;Initial Catalog=Chinadad;UID=sa;PWD=;"
'ConnStr="Driver={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("\")&"\Diary.mdb"
ConnStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("\")&"\Diary.mdb"
''Response.Write ConnStr&"<hr>"
Conn.Open ConnStr
Set Rs=Server.CreateObject("ADODB.Recordset")
sql="Select * from Diary order by DiaryID desc"
Rs.Open sql,Conn,1,1
n=0
if not rs.eof then
PageSize=10
Rs.PageSize=PageSize
RecordCount=Rs.RecordCount
PageNo=Request("PageNo")
if PageNo="" then
PageNo=1
elseif PageNo<=0 then
PageNo=1
else
PageNo=cint(PageNo)
if PageNo>rs.PageCount then PageNo=rs.PageCount
end if
Rs.AbsolutePage=cint(PageNo)
%>
<form method=post action="<%=Request.ServerVariables("Script_Name")%>">
<%for i=1 to PageSize
Response.Write (PageNo*PageSize+n)&"行-->"&rs("DiaryID")&"."&rs("DiaryName")&rs("DiaryDate")&"<hr>"%>
<%rs.movenext
if rs.eof then exit for
n=n+1%>
<%next%>
<%=n%>
<a href="?PageNo=1">首页</a> <%if PageNo>1 then%><a href="?PageNo=<%=PageNo-1%>">上页</a><%else%>上页<%end if%>
<%for i=0 to PageSize-1%>
<%if PageNo+1>=int(PageNo/PageSize)*PageSize then%><a href="?PageNo=<%=int(PageNo/PageSize)*PageSize+i%>">[<%=int(PageNo/PageSize)*PageSize+i%>]</a><%end if%>
<%next%>
<%if PageNo+1<Rs.PageCount+1 then%><a href="?PageNo=<%=PageNo+1%>">下页</a><%else%>下页<%end if%> <a href="?PageNo=<%=Rs.PageCount%>">尾页</a>
<input type="text" name="pageno" value=""><input type="submit" name="submit" value="转到页面">
</form>
<p>
<%end if
if Err.Number<>0 then
Response.Write "数据库连接失败:"&Err.Description
else
Response.Write "数据库连接成功:"&ConnStr
end if
%>
参考资料: http://www.51wisdom.com.cn/html/2250.html
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<TABLE
height=242
cellSpacing=0
cellPadding=0
width=949
border=0>
<TBODY>
<%
MaxPerPage=20
page=request("page")
if
isnumeric(page)=false
then
page=1
end
if
page=cint(page)
if
page<1
then
page=1
set
rs=server.CreateObject("adodb.recordset")
sql="select
*
from
pic"
rs.open
sql,conn,1,1
rs.PageSize=MaxPerPage
TotalPage=rs.PageCount
rs.AbsolutePage=page
i=0
do
while
not
rs.eof
%>
<%if
i
mod
4
=
0
then
%><TR><%end
if%>
<TD
align=middle>
<table
width="37"
height="103"
border="0"
cellpadding="0"
cellspacing="0">
<tr>
<td
style="padding-left:10px;
padding-right:10px;"><a
href='index.asp?Picname=<%=rs("Picname")%>'
style="font-weight:bold;
color:#000000;"><img
src="213.jpg"
width="216"
height="120"
border="0"
/></a></td>
</tr>
<tr>
<td
align="center"
valign="bottom"
style="padding-left:10px;
padding-right:10px;"><a
href='index.asp?Picname=<%=rs("Picname")%>'
style="font-weight:bold;
color:#000000;"><%=rs("PicTitle")%></a></td>
</tr>
</table></TD>
<%if
i
mod
4
=
3
then
%></TR><%end
if%>
<%
i=i+1
if
i>=MaxPerPage
then
exit
do
rs.movenext
loop
%>
<tr
align="right">
<td
height="23"
colspan="4">
<%if
page>1
then%>
<a
href="?page=1">首页</a>
<a
href="?page=<%=page-1%>">上一页</a>
|
<%else%>
首页
上一页
|
<%end
if%>
<%if
page<TotalPage
then%>
<a
href="?page=<%=page+1%>">下一页</a>
<a
href="?page=<%=TotalPage%>">尾页</a>
<%else%>
下一页
尾页
<%end
if%>
共<%=rs.recordcount%>条留言</td>
</tr>
<%
rs.close
set
rs=nothing
conn.close
set
conn=nothing
%>
</TBODY></TABLE>
height=242
cellSpacing=0
cellPadding=0
width=949
border=0>
<TBODY>
<%
MaxPerPage=20
page=request("page")
if
isnumeric(page)=false
then
page=1
end
if
page=cint(page)
if
page<1
then
page=1
set
rs=server.CreateObject("adodb.recordset")
sql="select
*
from
pic"
rs.open
sql,conn,1,1
rs.PageSize=MaxPerPage
TotalPage=rs.PageCount
rs.AbsolutePage=page
i=0
do
while
not
rs.eof
%>
<%if
i
mod
4
=
0
then
%><TR><%end
if%>
<TD
align=middle>
<table
width="37"
height="103"
border="0"
cellpadding="0"
cellspacing="0">
<tr>
<td
style="padding-left:10px;
padding-right:10px;"><a
href='index.asp?Picname=<%=rs("Picname")%>'
style="font-weight:bold;
color:#000000;"><img
src="213.jpg"
width="216"
height="120"
border="0"
/></a></td>
</tr>
<tr>
<td
align="center"
valign="bottom"
style="padding-left:10px;
padding-right:10px;"><a
href='index.asp?Picname=<%=rs("Picname")%>'
style="font-weight:bold;
color:#000000;"><%=rs("PicTitle")%></a></td>
</tr>
</table></TD>
<%if
i
mod
4
=
3
then
%></TR><%end
if%>
<%
i=i+1
if
i>=MaxPerPage
then
exit
do
rs.movenext
loop
%>
<tr
align="right">
<td
height="23"
colspan="4">
<%if
page>1
then%>
<a
href="?page=1">首页</a>
<a
href="?page=<%=page-1%>">上一页</a>
|
<%else%>
首页
上一页
|
<%end
if%>
<%if
page<TotalPage
then%>
<a
href="?page=<%=page+1%>">下一页</a>
<a
href="?page=<%=TotalPage%>">尾页</a>
<%else%>
下一页
尾页
<%end
if%>
共<%=rs.recordcount%>条留言</td>
</tr>
<%
rs.close
set
rs=nothing
conn.close
set
conn=nothing
%>
</TBODY></TABLE>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询