;// }else{ if($this->all == 1){ $str.=1(current); }else{ if($this->now > 1 && $this->now 第一页 now-1).'>«; for($i = 1; $i now; $i++) { $str.={$i}; } }elseif($this->now >= 6){ $str.=第一页 now-1).>« ...; for($i = $this->now-4; $i now; $i++) { $str.={$i}; } } $str.={$this->now}(current); if($this->all - $this->now > 4) { for($i = $this->now + 1; $i now + 4; $i++) { $str.={$i}; } $str.= ... now+1).'>» all}>最后页 ; }elseif($this->all - $this->now >= 1){ for($i = $this->now + 1; $i all; $i++) { $str.={$i}; } $str.=now+1).'>» all}>最后页; } } $str.= 跳到now}>页 go ; $str.= ;// } return $str; }}?>
我想问问这种分页什么意思 怎么有js代码
回复内容: all = $all; $this->now = $now; $this->seletor = $seletor; $this->url = $url; if($this->now > $this->all ){ $this->all = 0; } if($this->now now = 1; } } public function display(){ $str = ;// if($this->all == 0){// $str.=没有相关记录
;// }else{ if($this->all == 1){ $str.=1(current); }else{ if($this->now > 1 && $this->now 第一页 now-1).'>«; for($i = 1; $i now; $i++) { $str.={$i}; } }elseif($this->now >= 6){ $str.=第一页 now-1).>« ...; for($i = $this->now-4; $i now; $i++) { $str.={$i}; } } $str.={$this->now}(current); if($this->all - $this->now > 4) { for($i = $this->now + 1; $i now + 4; $i++) { $str.={$i}; } $str.= ... now+1).'>» all}>最后页 ; }elseif($this->all - $this->now >= 1){ for($i = $this->now + 1; $i all; $i++) { $str.={$i}; } $str.=now+1).'>» all}>最后页; } } $str.= 跳到now}>页 go ; $str.= ;// } return $str; }}?>
我想问问这种分页什么意思 怎么有js代码
这个应该是分页类。传入分页数据(一页显示条数,页数,页码等)直接生成html代码和分页的数据
与楼上的回答一致... 生成分页好的点击样式直接输出成html页面代码.. 包含样式/点击跳转等...
其实就是图简单,php 直接输出 html,然后页面上就有分页按钮了,但是修改样式的时候就比较不好控制