有关多行多列分页问题?
做了一个三行四列的的分页页面!
当多页时如果最后一页数据没有十二个剩下的就无法显示!
请问如何解决呢?
问题点数:20、回复次数:6Top
1 楼zhgroup(王员外)回复于 2004-12-03 00:43:43 得分 5
不足不就是显示为空吗。Top
2 楼uGain(uGain.org)回复于 2004-12-03 00:44:34 得分 5
没有值的时候就输出 占位.Top
3 楼net_mm(人生如梦)回复于 2004-12-03 01:05:30 得分 0
怎么显示呢?Top
4 楼net_mm(人生如梦)回复于 2004-12-03 01:28:17 得分 0
RstPrj.PageSize=12
lngPage=Request("Page")
if lngPage="" Or Not IsNumeric(lngPage) Then
lngPage=1
end if
lngPage=Clng(lngPage)
if lngPage>RstPrj.PageCount Then
lngPage=RstPrj.PageCount
elseif lngPage<=0 then
lngPage=1
end if
if RstPrj.PageCount<> 0 then
RstPrj.AbsolutePage=lngPage
end if
dim CurrentPage
CurrentPage=lngPage
%>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<table border="0" cellspacing="0" cellpadding="0">
<%
if not RstPrj.EOF then
%>
<tr>
<%
dim i
i=0
while not RstPrj.EOF and i<RstPrj.PageSize
%>
<td height="165" align="center" valign="middle" background="../image/ny_pro_bg.jpg" style="width:170px;height:165">
<table width="150" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="132" align="center" valign="bottom"><img src="<%=RstPrj("pic")%>" width="140" border="0"></td>
</tr>
<tr>
<td align="center"><a href="#" onclick="javascript:window.open('view.asp?id=<% =RstPrj("id") %>','InfoDetail','toolbar=no,scrollbars=no,resizable=no,top=0,left=0,width=600 height=400');"><%=RstPrj("productname")%></a></td>
</tr>
</table></td>
<%
i=i+1
RstPrj.MoveNext
if i mod 4 =0 then
Response.Write "</tr>"
end if
wend
else
%>
<td align="left" style="width:170px;height:165">没有产品信息</td>
<%
end if
%>
</tr>
</table>
<table height="23">
<form name="form1" action="cpfw.asp" method="Post">
<input type=hidden name="Pro_Title" value="<%=Pro_Title%>">
<input type=hidden name="ClassID" value="<%=ClassID%>">
<tr>
<td bgcolor="#FFFFFF" align="center"> <% if CurrentPage > 1 then %> <a href="mytest.asp?page=1&ClassID=<%=ClassID%>&Pro_Title=<%=Pro_Title%>">首
页</a> <a href="cpfw.asp?page=<%=CurrentPage-1%>&ClassID=<%=ClassID%>&Pro_Title=<%=Pro_Title%>">上一页</a>
<% end if %> <% if CurrentPage <RstPrj.PageCount then %> <a href="mytest.asp?page=<%=CurrentPage+1%>&ClassID=<%=ClassID%>&Pro_Title=<%=Pro_Title%>">下一页</a>
<a href="cpfw.asp?page=<%=RstPrj.PageCount%>&ClassID=<%=ClassID%>&Pro_Title=<%=Pro_Title%>">尾
页</a> <% end if %>
每页<font color="#0000FF"> <%=RstPrj.PageSize%> </font>条 共<font color="red"> <%=RstPrj.RecordCount %> </font>条 第
<input type="text" name="Page" size="4" value="<%=CurrentPage%>" maxlength="6">
页 分<font color="#0000FF"> <%=RstPrj.PageCount%> </font>页</td>
</tr>
</form>
</table></td>
</tr>
</table>
</div>
<%
RstPrj.Close()
set RstPrj=Nothing
写在那儿怎么写呢?Top
5 楼net_mm(人生如梦)回复于 2004-12-03 01:34:44 得分 0
第二页无法显示:( 问题在那儿也!Top
6 楼hujunhua(骨感男人)回复于 2004-12-03 10:16:19 得分 10
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<TR>
<%For i = 1 to myrs.PageSize%>
<TD>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><a href="javascript:view1('anli_list.asp?id=<%=myrs("id")%>')"><img src="stdnews/manage/anli_up/<%=myrs("picurl")%>" border="0" style="border: 1px #94B4E4 solid" width="160" height="120" alt=""></a></div></td>
</tr>
<tr>
<td height="2"></td>
</tr>
<tr>
<td><div align="center"><a href="javascript:view1('anli_list.asp?id=<%=myrs("id")%>')"><%=myrs("company_name")%></a></div></td>
</tr>
<tr>
<td height="2"></td>
</tr>
</table>
</td>
<%if i mod 3 <>0 then%>
<%end if%>
<% if i mod 3 =0 then%>
</TR>
<tr>
<%end if%>
<%
myrs.MoveNext
If myrs.EOF Then Exit For
next
%>
</tr>
</table>Top




