最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp分页显示代码
时间:2022-07-02 23:14:43 编辑:袖梨 来源:一聚教程网
Private Function ContentPagination(strContent)
Dim ContentLen, maxperpage, Paginate
Dim arrContent, TempContent, i
On Error Resume Next
strContent = Newasp.ReadContent(strContent)
strContent = Replace(strContent, "[NextPage]", "[page_break]")
strContent = Replace(strContent, "[Page_Break]", "[page_break]")
ContentLen = Len(strContent)
If InStr(strContent, "[page_break]") <= 0 Then
TempContent = strContent
Else
arrContent = Split(strContent, "[page_break]")
Paginate = UBound(arrContent) + 1
If CurrentPage = 0 Then
CurrentPage = 1
Else
CurrentPage = CInt(CurrentPage)
End If
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Paginate Then CurrentPage = Paginate
TempContent = TempContent & arrContent(CurrentPage - 1)
End If
ContentPagination = TempContent
End Function
Private Function ContentPaginations(strContent)
Dim ContentLen, maxperpage, Paginate
Dim arrContent, TempContent, i
On Error Resume Next
strContent = Newasp.ReadContent(strContent)
strContent = Replace(strContent, "[NextPage]", "[page_break]")
strContent = Replace(strContent, "[Page_Break]", "[page_break]")
ContentLen = Len(strContent)
If InStr(strContent, "[page_break]") <= 0 Then
TempContent = strContent
Else
arrContent = Split(strContent, "[page_break]")
Paginate = UBound(arrContent) + 1
If CurrentPage = 0 Then
CurrentPage = 1
Else
CurrentPage = CInt(CurrentPage)
End If
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Paginate Then CurrentPage = Paginate
TempContent = TempContent & arrContent(CurrentPage - 1)
TempContent = TempContent & "
"
If CurrentPage > 1 Then
If CreateHtml <> 0 Then
TempContent = TempContent & "上一页 "
Else
TempContent = TempContent & "上一页 "
End If
End If
For i = 1 To Paginate
If i = CurrentPage Then
TempContent = TempContent & "[" & i & "] "
Else
If CreateHtml <> 0 Then
TempContent = TempContent & "[" & i & "] "
Else
TempContent = TempContent & "[" & i & "] "
End If
End If
Next
If CurrentPage < Paginate Then
If CreateHtml <> 0 Then
TempContent = TempContent & " 下一页"
Else
TempContent = TempContent & " 下一页"
End If
End If
TempContent = TempContent & "
End If
ContentPaginations = TempContent
End Function
相关文章
- 光遇12.23每日任务怎么做 光遇12月23日每日任务做法攻略 12-23
- 光遇12.23大蜡烛在哪里 光遇12月23日大蜡烛位置攻略 12-23
- 光遇12.23免费魔法有什么 光遇12月23日免费魔法收集攻略 12-23
- 《流放之路2》寻找熔炉任务攻略分享 12-23
- 《流放之路2》德雷文打法技巧分享 12-23
- 《流放之路2》永恒裁判者德雷文具体位置介绍 12-23