当分的页数太多,怎么将页数写在下一行

来源:百度知道 编辑:UC知道 时间:2024/06/26 04:12:39
<%
if not (rsnews.eof and rsnews.bof) then
content=rsnews("Content") '读取内容
end if
if Err.number<>0 then
response.Write err.description
err.clear
response.End()
end if

'开始处理分页部分
dim page,pagecount,thispage,linenum,allline
const pageline=1'每页显示10行
content=replace( content,"[NextPage]","<br>")
linenum=split(content,"<br>") '本例为计算字符串<br>标记的个数
allline=ubound(linenum)+1 '全文<br>(换行标记)总数
pagecount=int(allline\pageline) '计算总页数
page=request("page")
if isempty(page) then
thispage=1
else
thispage=cint(page)
end if
for i=0 to allline-1
if i+1>thispage*pageline-pageline and i<thispage*pageline then
response.Write ""& linenum(i) & "<br>" '输出分页后的内容
end if
next
response.Write "<br&

在最后几句改:
else
response.Write "<a href='?page="& i &"&id="& id &"'>"& i & "</a> "
'输出所有分页连接
end if
if i mod 30 =0 then '如果除30余数为0的话 加一个换行符
response.Write "<BR>"
end if
next