>  기사  >  백엔드 개발  >  一个分页有关问题

一个分页有关问题

WBOY
WBOY원래의
2016-06-13 13:12:57825검색

求助一个分页问题
一面是一个淘宝的分页连接

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->

http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=0
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=40
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=80
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=120
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=160
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=200
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=240
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=280
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=320
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=360
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=400
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=440
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=480
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=520
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=560
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=600
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=640
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=680
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=720
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=760
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=800
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=840
http://s.taobao.com/search?style=grid&q=%C8%D5%BA%AB%B5%E7%D3%B0&initiative_id=staobaoz_20120807&style=list&s=880





我的问题是:
我们分页时一般都是page=1 ,page=2 ,page =3
而淘宝呢他们的分页是 s=0 ,s=40,s=80
我不明白的是TA为什么不s=1,s=2,s=3,以页码的方式展示呢?
后面为什么跟一个页面显示的数量呢??这样做的好处是什么哟???

后面我又看了一下baidu 他们的搜索与taobao差不多。
PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
http://www.baidu.com/s?wd=%E6%8A%8A%E7%99%BE%E5%BA%A6%E8%AE%BE&pn=0&ie=utf-8
http://www.baidu.com/s?wd=%E6%8A%8A%E7%99%BE%E5%BA%A6%E8%AE%BE&pn=10&ie=utf-8
http://www.baidu.com/s?wd=%E6%8A%8A%E7%99%BE%E5%BA%A6%E8%AE%BE&pn=20&ie=utf-8




看了一下google,他们的搜索与taobao差不多。
PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
http://74.125.128.105/#q=%E7%8B%97%E7%8B%97&hl=zh-CN&newwindow=1&prmd=imvns&ei=icwhULKWGYnYigfV3IC4Ag&start=10&sa=N&bav=on.2,or.r_gc.r_pw.&fp=389e782348690677&biw=1366&bih=619
http://74.125.128.105/#q=%E7%8B%97%E7%8B%97&hl=zh-CN&newwindow=1&prmd=imvns&ei=-NAhULOdEaeSiQedtIC4CA&start=20&sa=N&bav=on.2,or.r_gc.r_pw.&fp=389e782348690677&biw=1366&bih=619
http://74.125.128.105/#q=%E7%8B%97%E7%8B%97&hl=zh-CN&newwindow=1&prmd=imvns&ei=AdEhUM2WKauuiQei3ICoBg&start=30&sa=N&bav=on.2,or.r_gc.r_pw.&fp=389e782348690677&biw=1366&bih=619

 <div class="clear">
                 
              
              
        
            </div>
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.