文章内容分页

 

****示例:<%=PageList(rs("Content"))%> 

****在文章内容中加入:[PageList]

Function   PageList(str)  
  content=str  
  if   request.QueryString("page")=""   then  
  page=1  
  else  
  page=cint(request.QueryString("page"))    
  end   if  
  chenda=split(content,"[PageList]")  
  content=chenda(page-1)  
  response.Write   content  
  response.Write   "<p   align=center>本文共分:"  
  For   i   =   0   to   ubound(chenda)  
  response.Write   "<a   "  
  if   i=page-1   then   response.Write   "   style='color:red'   "  
  response.Write "<a href=?ID="&request("ID")&"&page="&i+1&">"&i+1&"</a> "  
  Next  
  response.Write   "页</p>"  
  end   Function

 

posted @ 2008-11-02 15:37  Lee Vane  阅读(213)  评论(0编辑  收藏  举报