javascript项目实战---ajax实现无刷新分页_javascript ajax技术应用—无刷新分页

public function __get(KaTeX parse error: Expected '}', got 'EOF' at end of input: args) { if (args == “limit”)
return $this->limit;
else
return null;
}

//页面开始的条数
private function start() {
if ( t h i s − > t o t a l = = 0 ) r e t u r n 0 ; e l s e r e t u r n ( this->total == 0) return 0; else return ( this>total==0)return0;elsereturn(this->page - 1) * $this->listRows + 1;
}

//页面结束的条数
private function end() {
return min($this->page * $this->listRows, $this->total);
}

/*设置首页*/
private function first() {
h t m l = " " ; i f ( html = ""; if ( html="";if(this->page == 1)
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.='&̲nbsp;'.this->config[“first”].’ ‘;
else
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='j…this->uri}&page=1")’>{KaTeX parse error: Expected 'EOF', got '}' at position 22: …config["first"]}̲</a>&nbsp;"; /…html.=" {$this->config[“first”]} ";

return $html;
}

/*设置上一页*/
private function prev() {
h t m l = " " ; i f ( html = ""; if ( html="";if(this->page == 1)
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.='&̲nbsp;'.this->config[“prev”].’ ';
else
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='j…this->uri}&page=" . (KaTeX parse error: Expected '}', got 'EOF' at end of input: … - 1) . "\")'>{this->config[“prev”]} “;
//KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='{this->uri}&page=”.(KaTeX parse error: Expected '}', got 'EOF' at end of input: …s->page-1)."'>{this->config[“prev”]} ";

return $html;
}

//页码列表【首页】【2】【3】…………【尾页】
private function pageList() {
$linkPage = “”;

i n u m = f l o o r ( inum = floor( inum=floor(this->listNum / 2);

for ($i = $inum; $i >= 1; $i–) {
$page = $this->page - $i;

if ($page < 1)
continue;

KaTeX parse error: Expected 'EOF', got '&' at position 12: linkPage.="&̲nbsp;<a href='j…this->uri}&page={KaTeX parse error: Expected 'EOF', got '}' at position 5: page}̲\")'>{page} ";
}

KaTeX parse error: Expected 'EOF', got '&' at position 12: linkPage.="&̲nbsp;{this->page} ";

for ($i = 1; $i <= $inum; $i++) {
$page = $this->page + i ; i f ( i; if ( i;if(page <= $this->pageNum)
KaTeX parse error: Expected 'EOF', got '&' at position 12: linkPage.="&̲nbsp;<a href='j…this->uri}&page={KaTeX parse error: Expected 'EOF', got '}' at position 5: page}̲\")'>{page} ";
else
break;
}

return $linkPage;
}

/*设置下一页*/
private function next() {
h t m l = " " ; i f ( html = ""; if ( html="";if(this->page == $this->pageNum)
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.='&̲nbsp;'.this->config[“next”].’ ';
else
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='j…this->uri}&page=" . (KaTeX parse error: Expected '}', got 'EOF' at end of input: … + 1) . "\")'>{this->config[“next”]} “;
//KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='{this->uri}&page=”.(KaTeX parse error: Expected '}', got 'EOF' at end of input: …>page + 1)."'>{this->config[“next”]} ";

return $html;
}

/*设置尾页*/
private function last() {
h t m l = " " ; i f ( html = ""; if ( html="";if(this->page == $this->pageNum)
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.='&̲nbsp;'.this->config[“last”].’ ‘;
else
KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='j…this->uri}&page=" . (KaTeX parse error: Expected '}', got 'EOF' at end of input: …eNum) . "\")'>{this->config[“last”]} ";
//KaTeX parse error: Expected 'EOF', got '&' at position 8: html.="&̲nbsp;<a href='{this->uri}&page=.(this->pageNum).’>{$this->config[“last”]} ";

return $html;
}

/*设置页面跳转*/
private function goPage() {

return
’ 
 ';
}

//页面列表配置选项
function fpage($display = array(0, 1, 2, 3, 4, 5, 6, 7, 8)) {
KaTeX parse error: Expected 'EOF', got '&' at position 12: html[0] = "&̲nbsp;共有<b>{this->total}{$this->config[“header”]} ";
KaTeX parse error: Expected 'EOF', got '&' at position 12: html[1] = "&̲nbsp;每页显示<b>" .…this->end() - KaTeX parse error: Expected '}', got 'EOF' at end of input: …. "</b>条,本页<b>{this->start()}-{$this->end()}条 ";
KaTeX parse error: Expected 'EOF', got '&' at position 12: html[2] = "&̲nbsp;<b>{this->page}/{$this->pageNum}页 ";

$html[3] = $this->first();
$html[4] = $this->prev();
$html[5] = $this->pageList();
$html[6] = $this->next();
$html[7] = $this->last();
$html[8] = $this->goPage();
f p a g e = ′ ′ ; f o r e a c h ( fpage = ''; foreach ( fpage=′′;foreach(display as $index) {
f p a g e . = fpage.= fpage.=html[$index];
}

return $fpage;
}

}


2 数据显示


![这里写图片描述](https://img-blog.youkuaiyun.com/20151013170755974)



<?php //链接数据库 //获得具体信息 //分页显示 header("content-type:text/html;charset=utf-8"); $link = mysql_connect('localhost','root','111111'); mysql_select_db('shop', $link); mysql_query("set names utf8"); $css = <<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值