以下是分页代码的一个过程,可是我想加一些功能,现在只有第一页,最有一页上一页下一页,我想增加只能跳到第几页的功能,该怎么加呢?最好也能列出每页页码,谢谢 在线等:
SUB ListPage ()
if trim(Request.form("PageNo")) = "" Then
PageNo = 1
else
PageNo = cint(Request.form("PageNo"))
end if
ScrollAction = Request.form("ScrollAction")
if ScrollAction = "上一页" Then
PageNo=PageNo-1
elseif ScrollAction = "下一页" Then
PageNo=PageNo+1
elseif ScrollAction = "第一页" Then
PageNo=1
elseif ScrollAction = "最后一页" Then
PageNo=rs.pagecount
end if
if PageNo < 1 Then PageNo = 1
response.write left(session ("ListPage"),len(session("ListPage"))-7)
response.Write "当前页:第 <font color=red>"& PageNo &"</font> 页 "
if PageNo > 1 Then
response.write" <input type=""submit"" name=""ScrollAction"" value=""第一页""> "
response.write" <input type=""submit"" name=""ScrollAction"" value=""上一页""> "
end if
if rs.pagecount > 1 and PageNo <>rs.pagecount then
response.write" <input type=""submit"" name=""ScrollAction"" value=""下一页""> "
response.write" <input type=""submit"" name=""ScrollAction"" value=""最后一页""> "
end if
response.write"</form>"
rs.close
set rs = nothing
END SUB
[求助]分页代码