"&vbcrlf
Case "3" '分页样式3:显示首页、上十页、下十页、尾页以及中间一段页码
PageStr = PageStr & "
"
PageStr = PageStr & ""
PageStr = PageStr & " "
p = (xCurrentPage - 1) 10
If xCurrentPage = 1 Then
PageStr = PageStr & " "
Else
PageStr = PageStr & " "
End If
If p * 10 > 0 Then
PageStr = PageStr & " "
End If
For i=(p * 10 + 1) To (p * 10 + 10)
If i = xCurrentPage Then
PageStr = PageStr & " []"
Else
PageStr = PageStr & " "
End If
If i = xPageCount Then Exit For
Next
If i »"
If xCurrentPage = xPageCount Then
PageStr = PageStr & " "
Else
PageStr = PageStr & " "
End If
PageStr = PageStr & "
"&vbcrlf
Case "4" '分页样式4:显示首页和尾页的页码、中间显示一部分页码
PageStr = PageStr & "
"
PageStr = PageStr & ""
PageStr = PageStr & " "
If xCurrentPage > 4 Then PageStr = PageStr & " [] ... "
If xCurrentPage
For i=xCurrentPage - 3 To PageTo
If i >= 1 Then
If i = xCurrentPage Then
PageStr = PageStr & " []"
Else
PageStr = PageStr & " []"
End If
End If
Next
If xCurrentPage " & xPageCount & ""
PageStr = PageStr & "
"&vbcrlf
Case "5" '分页样式5:显示首页、上一页、下一页、末页,均为汉字和转到页的选择列表
PageStr = PageStr & "
"&vbcrlf
Case "6" '分页样式5:显示首页、上一页、下一页、末页,数字页和转向文本框
PageStr = PageStr & "
"
PageStr = PageStr & ""
PageStr = PageStr & " "
PageStr = PageStr & " "
p = (xCurrentPage - 1) 10
If xCurrentPage = 1 Then
PageStr = PageStr & " "
Else
PageStr = PageStr & " "
End If
If p * 10 > 0 Then
PageStr = PageStr & " "
End If
For i=(p * 10 + 1) To (p * 10 + 10)
If i = xCurrentPage Then
PageStr = PageStr & " []"
Else
PageStr = PageStr & " []"
End If
If i = xPageCount Then Exit For
Next
If i »"
If xCurrentPage = xPageCount Then
PageStr = PageStr & " "&vbcrlf
Else
PageStr = PageStr & " []"&vbcrlf
End If
PageStr = PageStr & " 转到:页"&vbcrlf
PageStr = PageStr & "
"&vbcrlf
End Select
End If
Else
PageStr = " "&vbcrlf
End If
ShowPage = PageStr
End Function