最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ajax +php无刷新分页代码
时间:2010-07-24 编辑:简简单单 来源:一聚教程网
代码如下 | 复制代码 |
//index.php文件 |
pagination.js文件
代码如下 | 复制代码 |
function $() var xmlhttp function statechanged() function getxmlhttpobject() |
代码如下 | 复制代码 |
/* if($numrows % $recpage != 0){
if($previous < 0){ $anc .= " $anc .= " }else{ $anc .= " $anc .= " } ################if you dont want the numbers just comment this block############### $norepeat = 4;//no of pages showing in the left and right side of the current page in the anchors $j = 1; $anch = ""; for($i=$page_showing; $i>1; $i--){ $fpreviouspage = $i-1; $page = ceil($fpreviouspage*$recpage)-$recpage; $anch = " if($j == $norepeat) break; $j++; } $anc .= $anch; $anc .= " $j = 1; for($i=$page_showing; $i<$total_page; $i++){ $fnextpage = $i+1; $page = ceil($fnextpage*$recpage)-$recpage; $anc .= " if($j==$norepeat) break; $j++; } ############################################################ if($next >= $numrows){ $anc .= " $anc .= " }else{ $anc .= " $anc .= " } $anc .= " $this->anchors = $anc; $this->total = "page : $page_showing of $total_page . total records found: $numrows"; } } ?> |
-- phpmyadmin sql dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2010 年 07 月 07 日 09:26
-- 服务器版本: 5.1.41
-- php 版本: 5.3.1
set sql_mode="no_auto_value_on_zero";
--
-- 数据库: `mydemo`
--
-- --------------------------------------------------------
--
-- 表的结构 `students`
--
create table if not exists `students` (
`id` int(11) not null auto_increment,
`name` varchar(50) not null default '',
primary key (`id`)
) engine=myisam default charset=utf8 auto_increment=21 ;
--
-- 转存表中的数据 `students`
--
insert into `students` (`id`, `name`) values
(1, '小明'),
(2, 'aniesh'),
(3, 'babu'),
(4, '小黄'),
(5, 'praveesh'),
(6, 'dixon'),
(7, 'sanju'),
(8, 'neeraj'),
(9, 'siju'),
(10, 'noble'),
(11, 'bibin'),
(12, 'febin'),
(13, 'binu'),
(14, 'charles'),
(15, 'jaggu'),
(16, 'mani'),
(17, 'milu'),
(18, 'aravind'),
(19, 'jay'),
(20, 'hari');
-
上一个: php获取当前文件所有执行的函数和类
-
下一个: 数据库添加、修改、删除基础操作代码
相关文章
- PHP导出数据超时的优化建议解读 10-31
- PHP之mysql位运算解析 10-31
- Laravel实现登录跳转功能解析 10-31
- php双向队列解读 10-31
- Laravel异常上下文解决教程 10-24
- php数组查询元素位置方法介绍 10-24