ASP 分页代码 (20分)

下面的代码只能是 共xxx个flash x/x页 每页显示20个 首页 上一面 下一页 尾页 我想在加一个表单跳转的,就是点一下,点多少页到多少页的,我不会写代码啊,高手们帮帮忙了!

' allshu表示FLASH个数 MaxPerPage2表示每页显示个个数 ,Nclass_id表示连接页ID,mpage2表示共记多少页,currentPage2表示当前第几页
'#########设置分页函数
function pagelist(currentPage2,MaxPerPage2,Nclass_id,mpage2,allshu)
pageno=currentPage2
Nclass_show=""

Nclass_show="共"&allshu&"个flash "&pageno&"/"&mpage2&" 页 每页显示"&MaxPerPage2&" 个 "

if cint(pageno)>1 then
Nclass_show=Nclass_show&"<a href="&Nclass_id&"_1.htm title=""最前页"">首页</a> "
else
Nclass_show=Nclass_show&"首页 "
end if
if cint(pageno)>1 then
Nclass_show=Nclass_show&"<a href="&Nclass_id&"_"&pageno-1&".htm title=""上一页"">上一页</a> "
else
Nclass_show=Nclass_show&"上一页 "
end if

if cint(pageno)< mpage2 then
Nclass_show=Nclass_show&"<a href="&Nclass_id&"_"&pageno+1&".htm title=""下一页"">下一页</a> "
else
Nclass_show=Nclass_show&"下一页 "
end if

if cint(pageno)< mpage2 then
Nclass_show=Nclass_show&"<a href="&Nclass_id&"_"&mpage2&".htm title=""最后页"">尾页</a>"
else
Nclass_show=Nclass_show&"尾页"
end if
Nclass_show=Nclass_show&""
pagelist = Nclass_show
end function

intTotalRecords = rs.RecordCount
rs.PageSize = intPageSize
intTotalPages = rs.PageCount
If intCurrentPage > intTotalPages Then intCurrentPage = intTotalPages
If intTotalRecords > 0 Then rs.AbsolutePage = intCurrentPage
strOut(0) = strOut(0) & "共 " & intTotalRecords & " 条记录 "
strOut(0) = strOut(0) & "共 " & intTotalPages & " 页 "
strOut(0) = strOut(0) & "当前第 " & intCurrentPage & " 页 "
If intCurrentPage <> 1 And intTotalRecords <> 0 Then
strOut(0) = strOut(0) & "<a href=""?pageNum=1""><<首页</a> "
Else
strOut(0) = strOut(0) & "<<首页 "
End If
If intCurrentPage > 1 Then
strOut(0) = strOut(0) & "<a href=""?pageNum=" & intCurrentPage - 1 & """><上一页</a> "
Else
strOut(0) = strOut(0) & "<上一页 "
End If
If intCurrentPage < intTotalPages Then
strOut(0) = strOut(0) & "<a href=""?pageNum=" & intCurrentPage + 1 & """>下一页></a> "
Else
strOut(0) = strOut(0) & "下一页> "
End If
If intCurrentPage <> intTotalPages Then
strOut(0) = strOut(0) & "<a href=""?pageNum=" & intTotalPages & """>尾页>></a>"
Else
strOut(0) = strOut(0) & "尾页>>"
End If
温馨提示:内容为网友见解,仅供参考
无其他回答

ASP 分页代码 (20分)
intTotalRecords = rs.RecordCount rs.PageSize = intPageSize intTotalPages = rs.PageCount If intCurrentPage > intTotalPages Then intCurrentPage = intTotalPages If intTotalRecords > 0 Then rs.AbsolutePage = intCurrentPage strOut(0) = strOut(0) & "共 " & intTotalRecords & " 条...

asp内容分页代码
<% page=1 ' 设置变量PAGE=1 rs.PageSize = 8 '每页显示记录数 if Not IsEmpty(Request("Page")) then '如果PAGE已经初始化...Page = CInt(Request("Page")) '接收PAGE并化为数字型赋给PAGE变量 if Page > rs.PageCount then '如果接收的页数大于总页数 rs.AbsolutePage = rs.PageCoun...

asp分页代码
第三步:for i=1 to ts.pagecount ‘这里是把页码循环出来 response.write ""&i&"|"next

[求]asp数字分页代码
我一般用的分页代码如下:< set rs=server.CreateObject("ADODB.recordset")sql ="select * from 表"rs.open sql,conn,1,1 page=cint(request("page"))n=rs.RecordCount rs.pagesize=12 m=cint(rs.pagecount)if page="" then page=1 elseif page<1 then page=1 end if if cint(request(...

asp分页代码
Page = CLng(Request("Page"))If Page < 1 Then Page = 1 If Page > rs.PageCount Then Page = rs.PageCount i=page+(page-1)*(rs.PageSize-1)rs.AbsolutePage = Page > <form ACTION="<%=Myself%>?pages=<%=pages%>" METHOD="GET"> <%If Page <> 1 Then ' 如果...

ASP 内容分页代码。
<a href="chakan.asp?lx=<%=lx%>&page=<%=i%>"> <%if i=page then response.write i else response.write "["+cstr(i)+"]"end if%> <%next%> 页 <%end if rs.close conn.close set conn=nothing%><\/TD> <\/TR> <\/TBODY><\/TABLE> ...

求ASP分页代码。
sql="select * from student"rs.open sql,conn,3 rs.pagesize=20 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 > <%=rs(0).name%><%=rs(1).n...

asp内容分页代码
分页开始 < if currentpage > 4 then response.write "[1] ..."end if if Pcount>currentpage+3 then endpage=currentpage+3 else endpage=Pcount end if for i=currentpage-3 to endpage if not i<1 then if i = clng(currentpage) then response.write "["&i&"]"else response.w...

ASP内容分页代码
<%page=request("page")id1=request("id")Set rs = Server.CreateObject("ADODB.Recordset")rs.Open "Select * From Conews where id="&id1 ,conn,3,3PageLength=2000if not isempty(page)thenpage=cint(page)elsepage=1end ifif page<1 thenpage=1end ifcontent=rs("content")Length = ...

ASP分页代码
下面的代码就复制用可以了 '分页 i=50 rs.pagesize=i pu=request("pu")if pu="" then pu=1 if cint(pu)<="0" then pu=1 if cint(pu)>rs.pagecount then pu=rs.pagecount if not rs.eof then rs.absolutepage=cint(pu)'显示记录 if not rs.eof then do while not rs.eof and ...

相似回答
大家正在搜