javascript项目实战---ajax实现无刷新分页_javascript ajax技术应用—无刷新分页
" .…KaTeX parse error: Expected 'EOF', got '&' at position 12: html[0] = "&̲nbsp;. "
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 数据显示

<?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 = <<更多推荐
所有评论(0)