asp分页文件问题
FunctionArticleContentPage()DimsTemp,isTemp="<divclass='content_page'style='font-weig...
Function ArticleContentPage()
Dim sTemp, i
sTemp = "<div class='content_page' style='font-weight: bold;'>"
sTemp = sTemp & "<p><a href='" & FileName & "?InfoID=" & InfoID & "&Page=" & 1 & "'>首页</a> "
if CreateHtmlIng = True then
if CurrentPage>1 then
if (CurrentPage-1) > 1 then
sTemp = sTemp & "<a href='" & sInfoFileName & "_P" & CurrentPage-1 & "."&Cl.Channel.selectSingleNode("@createfileext").text&"'>上一页</a> "
else
sTemp = sTemp & "<a href='" & sInfoFileName & "."&Cl.Channel.selectSingleNode("@createfileext").text&"'>上一页</a> "
end if
end if
for i = 1 to pages
if i = CurrentPage then
sTemp = sTemp & "<strong><font color='#ff0033'>[" & cstr(i) & "]</font></strong> "
else
if i>1 then
sTemp = sTemp & "<a href='" & sInfoFileName & "_P" & i & "."&Cl.Channel.selectSingleNode("@createfileext").text&"'>[" & i & "]</a> "
else
sTemp = sTemp & "<a href='" & sInfoFileName & "."&Cl.Channel.selectSingleNode("@createfileext").text&"'>[" & i & "]</a> "
end if
end if
next
(这里分行)
if CurrentPage<pages then
sTemp = sTemp & " <a href='" & sInfoFileName & "_P" & CurrentPage+1 & "."&Cl.Channel.selectSingleNode("@createfileext").text&"'>下一页</a>"
end if
else
if CurrentPage>1 then
sTemp = sTemp & "<a href='" & FileName & "?InfoID=" & InfoID & "&Page=" & CurrentPage-1 & "'>上一页</a> "
end if
for i = 1 to pages
if i = CurrentPage then
sTemp = sTemp & "<strong><font color='#ff0033'>[" & cstr(i) & "]</font></strong> "
else
sTemp = sTemp & "<a href='" & FileName & "?InfoID=" & InfoID & "&Page=" & i & "'>[" & i & "]</a> "
end if
next
if CurrentPage<pages then
sTemp = sTemp & " <a href='" & FileName & "?InfoID=" & InfoID & "&Page=" & CurrentPage+1 & "'>下一页</a> "
end if
end if
sTemp = sTemp & "<a href='" & FileName & "?InfoID=" & InfoID & "&Page=" & Pages & "'>末页</a> "
ArticleContentPage = sTemp & "</div>"
End Function
--------------------------------------------------------------------------------
这代码的作用是对页面进行分页
但是分页页面大于30的话
一行页面就不能全部显示了
所以当页面分页数大于30时,必须换行
求在上面的文件中加入“当前页面数大于30时”进行换行的代码
或者
给个代码:
首页 上一页 1 2 3 4 5 6 7 8 9 10 下一页 末页
当当前页面大于10时,显示如下:
首页 上一页 11 12 13 14 15 16 17 18 19 20
请问
if (CurrentPage mod 30)=0 then
sTemp = sTemp & "<br>"
end if
我这样是哪里错误,网页显示不对的 展开
Dim sTemp, i
sTemp = "<div class='content_page' style='font-weight: bold;'>"
sTemp = sTemp & "<p><a href='" & FileName & "?InfoID=" & InfoID & "&Page=" & 1 & "'>首页</a> "
if CreateHtmlIng = True then
if CurrentPage>1 then
if (CurrentPage-1) > 1 then
sTemp = sTemp & "<a href='" & sInfoFileName & "_P" & CurrentPage-1 & "."&Cl.Channel.selectSingleNode("@createfileext").text&"'>上一页</a> "
else
sTemp = sTemp & "<a href='" & sInfoFileName & "."&Cl.Channel.selectSingleNode("@createfileext").text&"'>上一页</a> "
end if
end if
for i = 1 to pages
if i = CurrentPage then
sTemp = sTemp & "<strong><font color='#ff0033'>[" & cstr(i) & "]</font></strong> "
else
if i>1 then
sTemp = sTemp & "<a href='" & sInfoFileName & "_P" & i & "."&Cl.Channel.selectSingleNode("@createfileext").text&"'>[" & i & "]</a> "
else
sTemp = sTemp & "<a href='" & sInfoFileName & "."&Cl.Channel.selectSingleNode("@createfileext").text&"'>[" & i & "]</a> "
end if
end if
next
(这里分行)
if CurrentPage<pages then
sTemp = sTemp & " <a href='" & sInfoFileName & "_P" & CurrentPage+1 & "."&Cl.Channel.selectSingleNode("@createfileext").text&"'>下一页</a>"
end if
else
if CurrentPage>1 then
sTemp = sTemp & "<a href='" & FileName & "?InfoID=" & InfoID & "&Page=" & CurrentPage-1 & "'>上一页</a> "
end if
for i = 1 to pages
if i = CurrentPage then
sTemp = sTemp & "<strong><font color='#ff0033'>[" & cstr(i) & "]</font></strong> "
else
sTemp = sTemp & "<a href='" & FileName & "?InfoID=" & InfoID & "&Page=" & i & "'>[" & i & "]</a> "
end if
next
if CurrentPage<pages then
sTemp = sTemp & " <a href='" & FileName & "?InfoID=" & InfoID & "&Page=" & CurrentPage+1 & "'>下一页</a> "
end if
end if
sTemp = sTemp & "<a href='" & FileName & "?InfoID=" & InfoID & "&Page=" & Pages & "'>末页</a> "
ArticleContentPage = sTemp & "</div>"
End Function
--------------------------------------------------------------------------------
这代码的作用是对页面进行分页
但是分页页面大于30的话
一行页面就不能全部显示了
所以当页面分页数大于30时,必须换行
求在上面的文件中加入“当前页面数大于30时”进行换行的代码
或者
给个代码:
首页 上一页 1 2 3 4 5 6 7 8 9 10 下一页 末页
当当前页面大于10时,显示如下:
首页 上一页 11 12 13 14 15 16 17 18 19 20
请问
if (CurrentPage mod 30)=0 then
sTemp = sTemp & "<br>"
end if
我这样是哪里错误,网页显示不对的 展开
展开全部
if (id mod 30)=0 then
response.write"<br>"
end if
只显示10
page 当前页面
tatolpage 总页数
if (page mod 10)=0 then
papgestart=(page/10-1)*10+1
else
papgestart=(page-(page mod 10))+1
end if
papgeover=papgestart+9
if papgeover-t-tatolpage>0 then
papgeover=tatolpage
end if
for i=pagestart to pageover
next
貌似这样可以
response.write"<br>"
end if
只显示10
page 当前页面
tatolpage 总页数
if (page mod 10)=0 then
papgestart=(page/10-1)*10+1
else
papgestart=(page-(page mod 10))+1
end if
papgeover=papgestart+9
if papgeover-t-tatolpage>0 then
papgeover=tatolpage
end if
for i=pagestart to pageover
next
貌似这样可以
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询