Home > php教程 > php手册 > PHP+ajax无刷新分页程序下载

PHP+ajax无刷新分页程序下载

WBOY
Release: 2016-06-07 11:35:40
Original
1025 people have browsed it

这是用PHP原生写的分页方法。点击分页或搜索,ajax传参keyword和page,然后我们在ajax.php接受参数,并根据搜索条件来查询表js。所用到的表已放在文件夹里面。
PHP+ajax无刷新分页程序下载
分页是自己原创的:function getPageHtml($current, $count, $page_row) {<br>     $page_total = ceil($count / $page_row);<br>     if ($page_total > 1) {<br>         $page_html = "" . $count . " 条记录 " . $current . "/" . $page_total . " 页";<br> <br>         if ($current > 1) {<br>             $page_html .="<a>上一页</a>";<br>         }<br>         if ($page_total > $current) {<br>             $page_html .="<a>下一页</a>";<br>         }<br>         if ($current > 5) {<br>             $page_html .="<a>第一页</a>";<br>         }<br>         for ($i = 1; $i              if ($current == $i) {<br>                 $page_html .= "<a>" . $i . "</a>";<br>             } else {<br>                 $page_html .= "<a>" . $i . "</a>";<br>             }<br>         }<br>         $page_html .="<a>最后一页</a>";<br>     } else {<br>         $page_html = "" . $count . " 条记录";<br>     }<br>     return $page_html;<br> }PHP无刷新分页演示地址:http://www.sucaihuo.com/js/618.html

附件 PHP+jQuery+Ajax无刷新分页加搜索.zip ( 57.64 KB 下载:217 次 )

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template