谁有空帮我改一下这段ASP代码
Private Sub ContentPagination()
Dim ContentLen, maxperpage, Paginate
Dim arrContent, strContent, i
Dim m_strFileUrl,m_strFileExt
strContent = ubb.UBBCode(TextContent)
strContent = Replace(strContent, "[NextPage]", "[page_break]")
strContent = Replace(strContent, "[Page_Break]", "[page_break]")
ContentLen = Len(strContent)
If InStr(strContent, "[page_break]") <= 0 Then
If UserArticle = True Then
strContent = Newasp.RemoveHtml(strContent)
strContent = Left(strContent,maxstrlen)
End If
ArticleContent = "" & strContent & ""
Else
arrContent = Split(strContent, "[page_break]")
Paginate = UBound(arrContent) + 1
If CurrentPage = 0 Then
CurrentPage = 1
Else
CurrentPage = CLng(CurrentPage)
End If
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Paginate Then CurrentPage = Paginate
If UserArticle = True Then
If CurrentPage = 1 Then
strContent = arrContent(CurrentPage - 1)
strContent = Newasp.RemoveHtml(strContent)
strContent = Left(strContent,maxstrlen)
strContent = "" & strContent & ""
Else
strContent = ""
End If
Else
'strContent = arrContent(CurrentPage - 1)
strContent = ""& arrContent(CurrentPage - 1)
End If
ArticleContent = ArticleContent & strContent
If UserArticle = True Then
ArticleContent = ArticleContent & "</p></div><p align=""center""><b>"
Else
ArticleContent = ArticleContent & "</p></div><p align=""center""><b>"
End If
If IsURLRewrite Then
m_strFileExt = Newasp.HtmlExtName
m_strFileUrl = ArticleID & "_"
Else
m_strFileExt = ""
m_strFileUrl = "?id=" & ArticleID & "&Page="
End If
If CurrentPage > 1 Then
If IsURLRewrite And (CurrentPage-1) = 1 Then
ArticleContent = ArticleContent & "<a href="""& ArticleID & m_strFileExt & """>上一页</a> "
Else
ArticleContent = ArticleContent & "<a href="""& m_strFileUrl & CurrentPage - 1 & m_strFileExt & """>上一页</a> "
End If
End If
For i = 1 To Paginate
If i = CurrentPage Then
ArticleContent = ArticleContent & "<font color=""red"">[" & CStr(i) & "]</font> "
Else
If IsURLRewrite And i = 1 Then
ArticleContent = ArticleContent & "<a href="""& ArticleID & m_strFileExt & """>[" & i & "]</a> "
Else
ArticleContent = ArticleContent & "<a href="""& m_strFileUrl & i & m_strFileExt & """>[" & i & "]</a> "
End if
End If
Next
If CurrentPage < Paginate Then
ArticleContent = ArticleContent & " <a href="""& m_strFileUrl & CurrentPage + 1 & m_strFileExt & """>下一页</a>"
End If
ArticleContent = ArticleContent & "</b></p>"
End If
End Sub
以上的代码 输出结果: [1]-----[n] 下一页 ---太长了
想修改成 输出结果
[1] [2] [3][4][5][6][7][8][9][10]下一页 当点[10]的时候自动变成
上一页 [11][12][13][14][15][16][17][18][19]----[N] 下一页
希望在以上代码修改....
追问:需然不是100%我想要`但是你回答的接近答案了!就采纳给你吧 刚才采纳一次了!不过不小心删除了