高分求救!!!急呀!!!!!!!!

2024-10-30 16:47:52
推荐回答(2个)
回答1:

试试:


















<%
page=clng(request("page"))
set rs=server.CreateObject("adodb.recordset")
sql="select * from links order by id desc"
rs.open sql,conn,1,3

if rs.bof and rs.eof then
response.Write ""
else

rs.PageSize=14
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page
k=1
for j=1 to rs.PageSize
if k=1 then Response.Write ""
%>




<%
if k=2 then Response.Write "" : k=1
k=k+1
s=s+1
rs.movenext
if rs.eof then exit for
next
%>
no,file
" target="_blank"><%=rs("name")%>







<%if Page<2 then
response.write "首页 上一页 "
else
response.write "首页 "
response.write "上一页 "
end if
if rs.pagecount-page<1 then
response.write "下一页 尾页"
else
response.write ""
response.write "下一页
尾页"
end if
response.write " 页次:"&Page&"/"&rs.pagecount&"页 "

response.write " 转到:"
response.write " "
end if
%>


===========================================
看了你的提问和代码,不是很明白你的意思。
是不是要分左右两栏显示,每栏10条记录,这10条记录分10行显示?

















<%
page=clng(request("page"))
set rs=server.CreateObject("adodb.recordset")
sql="select * from links order by id desc"
rs.open sql,conn,1,3

if rs.bof and rs.eof then
response.Write ""
else

rs.PageSize=14
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page
%>




no,file


<%
for j=1 to rs.PageSize
%>






<%
if j=10 then
%>
" target="_blank"><%=rs("name")%>



<%
end if
s=s+1
rs.movenext
if rs.eof then exit for
next
%>








<%if Page<2 then
response.write "首页 上一页 "
else
response.write "首页 "
response.write "上一页 "
end if
if rs.pagecount-page<1 then
response.write "下一页 尾页"
else
response.write ""
response.write "下一页
尾页"
end if
response.write " 页次:"&Page&"/"&rs.pagecount&"页 "

response.write " 转到:"
response.write " "
end if
%>

回答2:

先在循环前做好表头
然后循环的时候输出行列就行了,可以找个简单的列表看看其代码,看其如何组织的。