document.write("页[1]2 3 4 5 6 7 8  >>")

解决方案 »

  1.   

    ls....
    无敌
    潜行的诡计与研究 --出自WOW吗?
      

  2.   

    dim i,endpage
    if totalpage<= 1 then exit sub 
    response.write "<table width=100% border=0 align=center>"
    response.write "<tr><td align=right height=25pt>>> "
    response.write "页次:<b>" & currentpage & "</b>/<b>" & totalpage & "</b>&nbsp;每页:<b>" & pgsz & "</b> 总数:<b>"& total &"</b></td></tr>"
    response.write "<tr><td align=right height=25pt>>> 分页选择:"
    if currentpage > 4 then
    response.write "<a href="&request.ServerVariables("script_name") & "?page=1>[1]</a> ..."
    end if
    if totalpage>currentpage+3 then
    endpage=currentpage+3
    else
    endpage=totalpage
    end if
    for i=currentpage-3 to endpage
    if not i<1 then
    if i = clng(currentpage) then
    response.write " [" & i & "]"
    else
    response.write " <a href="&request.ServerVariables("script_name") & "?page=" & i & ">[" & i & "]</a>"
    end if
    end if
    next
    if currentpage+3 < totalpage then
    response.write "... <a href=" & request.ServerVariables("script_name") & "?page=" & totalpage & ">[" & totalpage & "]</a>"
    end if
    response.write "</td></tr></table>"