ASP 分页代码 (20分)

来源:百度知道 编辑:UC知道 时间:2024/06/20 13:22:53
下面的代码只能是 共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 <

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> "