> 백엔드 개발 > PHP 튜토리얼 > 一个分页有关问题

一个分页有关问题

WBOY
풀어 주다: 2016-06-13 13:12:57
원래의
877명이 탐색했습니다.

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

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>
로그인 후 복사
관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿