当前位置:首页 » 业界相关

请教ASP+access分页技术?!

 Advertisement:

热门软件下载:


想把页面搞成这样子:  
  数据1         数据2         数据3       数据4  
   
  数据5         数据6         数据7       数据8  
   
  数据9         数据10       数据11     数据12  
   
                                    第一页   上一页   下一页   最后一页   转到   页  
   
  每个数据自动连接一个地址  
   
  该怎么做?能够给出相关实例和说明吗?请详细一点。因为我刚入门哦......

推荐阅读

  • ALTERA [详细内容]
  • 索尼PS3本月17日登陆香港台湾 与北美同步 [详细内容]
  • 小S两周使用心得 [详细内容]
  • TCL王牌 [详细内容]
  • 索尼VPL-CX70商务投影机 万元左右开卖 [详细内容]
  • E680使用感 [详细内容]
  • 精进实业有限公司 [详细内容]
  • 网友回答:
    网友:mygia

    <table>  
      <tr>  
      <%  
      i=0  
      do   while   not   rs.eof  
      %>  
      <td><%=rs("数据字段名")%></td>  
      <%  
      if   i   mod   4=0   then  
      response.write   "</tr><tr>"  
      end   if  
      i=i+1  
      if   i>=12   then   exit   do  
      rs.movenext  
      loop  
      %>  
      </tr>  
      </table>

    网友:xilu2301

    sub   showpagebar(totalpage,curpage,strurl)  
       
      dim   strpage  
      curpage=getvalidpageno(totalpage,curpage)  
       
      response.write   "页数:"   &   curpage   &   "/"   &   totalpage   &   "&nbsp;&nbsp;&nbsp;"  
      if   instr(strurl,"?")=0   then  
      strpage="?page="  
      else  
      strpage="&page="  
      end   if  
       
      if   curpage>1   then  
      response.write   "<a   href="   &   strurl   &strpage&"1>第一页&nbsp;&nbsp;&nbsp;"  
      else  
      response.write   "第一页&nbsp;&nbsp;&nbsp;"  
      end   if  
       
      if   curpage>=2   then  
      response.write   "<a   href="   &   strurl   &   strpage   &curpage-1&">上一页</a>&nbsp;&nbsp;&nbsp;"  
      else  
      response.write   "上一页&nbsp;&nbsp;&nbsp;"  
      end   if  
       
      if   cint(curpage)<cint(totalpage)   then  
      response.write   "<a   href="   &   strurl   &   strpage   &curpage+1&">下一页</a>&nbsp;&nbsp;&nbsp;"  
      else  
      response.write   "下一页&nbsp;&nbsp;&nbsp;"  
      end   if  
       
      if   cint(curpage)   <>cint(totalpage)   then  
      response.write   "<a   href="   &   strurl   &   strpage   &   totalpage&">最后一页</a>"  
      else  
      response.write   "最后一页"  
      end   if  
      end   sub  
       
      function   getvalidpageno(pagecount,curpage)  
      dim   ipage  
      ipage=curpage  
      if   cint(curpage)<1   then  
      ipage=   1  
      end   if  
      if   cint(ipage)   >   cint(pagecount)   then  
      ipage=   pagecount  
      end   if  
      getvalidpageno=ipage  
      end   function

    .  

    相关评论

    Login