ajax实现分页查询功能
(编辑:jimmy 日期: 2024/11/15 浏览:3 次 )
ajax分页查询功能的具体代码,供大家参考,具体内容如下
显示的效果如下:
实现效果的代码如下:
1.fenye.php
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <link type="text/css" rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="external nofollow" /> <script src="/UploadFiles/2021-04-02/jquery-3.2.0.min.js">2.chuli.php
<"page"]; $num = $_POST["num"]; $name = $_POST["name"]; require "../DBDA.class.php"; $db = new DBDA(); $tguo = ($page-1)*$num; $sql = "select * from nation where nno like '%{$name}%' limit {$tguo},{$num}"; echo $db->jsonquery($sql);3.zongtiaoshu.php
<"name"]; require"../DBDA.class.php"; $db = new DBDA(); $sql ="select count(*) from nation where nno like '%{$name}%'"; echo $db->strquery($sql);以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
下一篇:ajax实现加载数据功能