
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
%> 展开
<% 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
%> 展开
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
首先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
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
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询