日期:2014-05-17  浏览次数:20476 次

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

PHP code


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

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

http://74.125