asp数据读书自动换行分页
<%setrs=server.createobject("adodb.recordset")sql="select*from[WJ_user]whereWJ_comein...
<%
set rs=server.createobject("adodb.recordset")
sql="select * from [WJ_user] where WJ_comein>1 and WJ_validate=1 order by WJ_userid "
rs.open sql,conn,1
rs.pagesize=5
if request("page")<>"" then
epage=cint(request("page"))
if epage<1 then epage=1
if epage>rs.pagecount then epage=rs.pagecount
else
epage=1
end if
rs.absolutepage=epage
%>
<%
for i=1 to rs.pagesize
%>
<%
if rs.bof or rs.eof then exit for
%>
<table width="200" height="200" border="0" align="left" cellpadding="0" cellspacing="0">
<%if rs(6).value="no" then%>
<tr>
<td height="200" width="196" align="center" ><a href="xshi.asp?id=<%=rs(0).value%>" target="_blank"><%=rs(3).value%><br><%=rs(5).value%></font></a></td>
<td height="200" width="4"> </td>
</tr>
<%else%>
<tr>
<td height="200" width="200" align="center" ><a href="xshi.asp?id=<%=rs(0).value%>" target="_blank"><img src="<%=rs(6).value%>" width="200" height="196" alt="<%=rs(5).value%>【点入】<%=rs(12).value%>【点出】<%=rs(13).value%>" border="0"></a></td>
<td height="200" width="4"> </td>
</tr>
<% end if %>
</table>
<%
rs.movenext()
next
%>
<tr>
<td height="22" valign="top" >
<p align="center">
<font face="方正姚体"><b>
<a href="">首页</a>
<a href="index1.asp?page=<%=epage-1%>">前一页</a>
<a href="index1.asp?page=<%=epage+1%>">后一页</a>
<a href="index1.asp?page=<%=rs.pagecount%>">末页</a> 现在是<font color="#FF9900">第<%=epage%>页</font>一共<%=rs.pagecount%>页</b></font></p>
</table>
<%
conn.close()
%> 展开
set rs=server.createobject("adodb.recordset")
sql="select * from [WJ_user] where WJ_comein>1 and WJ_validate=1 order by WJ_userid "
rs.open sql,conn,1
rs.pagesize=5
if request("page")<>"" then
epage=cint(request("page"))
if epage<1 then epage=1
if epage>rs.pagecount then epage=rs.pagecount
else
epage=1
end if
rs.absolutepage=epage
%>
<%
for i=1 to rs.pagesize
%>
<%
if rs.bof or rs.eof then exit for
%>
<table width="200" height="200" border="0" align="left" cellpadding="0" cellspacing="0">
<%if rs(6).value="no" then%>
<tr>
<td height="200" width="196" align="center" ><a href="xshi.asp?id=<%=rs(0).value%>" target="_blank"><%=rs(3).value%><br><%=rs(5).value%></font></a></td>
<td height="200" width="4"> </td>
</tr>
<%else%>
<tr>
<td height="200" width="200" align="center" ><a href="xshi.asp?id=<%=rs(0).value%>" target="_blank"><img src="<%=rs(6).value%>" width="200" height="196" alt="<%=rs(5).value%>【点入】<%=rs(12).value%>【点出】<%=rs(13).value%>" border="0"></a></td>
<td height="200" width="4"> </td>
</tr>
<% end if %>
</table>
<%
rs.movenext()
next
%>
<tr>
<td height="22" valign="top" >
<p align="center">
<font face="方正姚体"><b>
<a href="">首页</a>
<a href="index1.asp?page=<%=epage-1%>">前一页</a>
<a href="index1.asp?page=<%=epage+1%>">后一页</a>
<a href="index1.asp?page=<%=rs.pagecount%>">末页</a> 现在是<font color="#FF9900">第<%=epage%>页</font>一共<%=rs.pagecount%>页</b></font></p>
</table>
<%
conn.close()
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询