代码如下 | 复制代码 |
//index.php文件 header("content-type: text/html; charset=utf-8"); error_reporting(e_all^e_notice); include('pagination_class.php'); mysql教程_connect('localhost', 'root', '') or die(mysql_error()); mysql_select_db('mydemo'); mysql_query("set names 'utf8'"); ?> <script language="网页特效" src="pagination.网页特效"></script> <link rel="stylesheet" type="text/css教程" href="style.css" /> <? $qry = "select * from students"; $searchtext = ""; if($_request['search_text']!=""){ $searchtext = $_request['search_text']; $qry .=" where name like '$searchtext%'"; } //for pagination $starting=0; $recpage = 2;//number of records per page $obj = new pagination_class($qry,$starting,$recpage); $result = $obj->result; |
pagination.js文件
代码如下 | 复制代码 |
function $() { var elements = new array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') element = document.getelementbyid(element); if (arguments.length == 1) return element; elements.push(element); } return elements; } var xmlhttp function statechanged() function getxmlhttpobject() |
首页 1 2 末页