Asp分页换行的问题

希望在19页时换行,代码如下,该如何加代码<%neirong=replace(neirong,"<DIVid=Cnt-Main-Article-QQ>","")neiro... 希望在19页时换行,代码如下,该如何加代码
<% neirong=replace(neirong,"<DIV id=Cnt-Main-Article-QQ>","")
neirong=replace(neirong,"</DIV>","")
neirong=replace(neirong,"<DIV","<p")
dim content,i
content= split(neirong,"[PP]")
if isnumeric(request("page")) then
page=clng(request("page"))
else
page = 1
end if
if page<1 then page=1
if page>ubound(content)+1 then page=ubound(content)+1
response.Write content(page-1)

if ubound(content)>0 then
response.Write "<div class=""fy"">"
for i=0 to ubound(content)
if i = page-1 then
response.Write "<span class=""dq"">"
response.Write i+1&""
response.Write "</span>"
else
response.Write "<span class=""sx""><a href=""?id="&id&"&page=" & i+1 & """>"&i+1&"</a></span>"
next
response.Write "</div>"
end if
%>
展开
 我来答
鸭骑鹿背
2010-08-16 · TA获得超过286个赞
知道小有建树答主
回答量:407
采纳率:0%
帮助的人:116万
展开全部
if ubound(content)>0 then
response.Write "<div class=""fy"">"
for i=0 to ubound(content)
if i = page-1 then
response.Write "<span class=""dq"">"
response.Write i+1&""
response.Write "</span>"
else
response.Write "<span class=""sx""><a href=""?id="&id&"&page=" & i+1 & """>"&i+1&"</a></span>"
next
response.Write "</div>"
end if

首先next上面还要一个end if
然后变成

if ubound(content)>0 then
response.Write "<div class=""fy"">"
for i=0 to ubound(content)
'这里添加点料
if i=18 then
response.write("</div>")
response.write("<div class='fy'>")
end if

if i = page-1 then
response.Write "<span class=""dq"">"
response.Write i+1&""
response.Write "</span>"
else
response.Write "<span class=""sx""><a href=""?id="&id&"&page=" & i+1 & """>"&i+1&"</a></span>"

end if'别漏了

next
response.Write "</div>"
end if
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式