asp新闻内容分页显示怎么 实现啊 ?

来源:百度知道 编辑:UC知道 时间:2024/05/02 04:42:13
asp新闻内容分页显示怎么 实现啊 ?

function Automatic(content)'自动分页
'[page][/page]为分界点
if len(request.ServerVariables("QUERY_STRING"))>0 then
strfile=request.ServerVariables("SCRIPT_NAME")&"?"&request.ServerVariables("QUERY_STRING")
else
strfile=request.ServerVariables("SCRIPT_NAME")
end if

page=chkstr(request("page"))
if instr(content,"[page][/page]")>0 then
arrcon=split(content,"[page][/page]")
if len(page)=0 then
page=0
end if
content=arrcon(page)
for i=0 to ubound(arrcon)
if cstr(page)=cstr(i) then
str=str &(i+1) &" "
else
str=str & "<a href="& JoinChar(strfile) &"page="& i &" style='font-size:12px;font-weight:bold;'>"& i+1 &"</a> "
end if
next
strtable="<table border='0' align='center' style='font