This article mainly introduces its own Ajax page-flipping effect, imitating the YII framework, the need for friends can refer to the following
Code as follows: <! DOCTYPE html> <html> <head> <title>ajax pagination </title> <script src= "Http://code.jquery.com/jquery-1.11.0.min.js" ></script> <script> function Loadxmldoc ($ URL) { var xmlhttp; if (window. XMLHttpRequest) {//code for ie7+, Firefox, Chrome, Opera, safari xmlhttp=new XMLHttpRequest (); else {//code for IE6, ie5 xmlhttp=new activexobject ("Microsoft.XMLHTTP"); } Xmlhttp.onreadystatechange=function () { if (xmlhttp.readystate==4 && xmlhttp.status==200) { var $data = $ (' <div> ' + xmlhttp.responsetext + ' </div> '); //Alert ($ ("#updateId", $data). HTML () ); //document.getElementById ("Mydiv") .innerhtml=xmlhttp.responsetext; $ ("#updateId"). ReplaceWith ($ (" #updateId ", $data)); } } xmlhttp.open (" Get ", $url, True); xmlhttp.send (); } </ script> </head> <body> <table id= "UpdateID" > <tr><td& gt;id</td><td> title </td><td> Time </td></tr> <?php if (isset ($_get[' P ')) &&$_get[' p '] = = 2):?> <tr><td>2</td><td>222</td><td>222</ td></tr> <tr><td>2</td><td>222</td><td>222</td></tr > <?php Else:?> <tr><td>1</td><td>111</td><td>111</td ></tr> <tr><td>1</td><td>111</td><td>111</td></tr > <?php endif?> </table> <div><a href= "javascript:;" onclick= "Loadxmldoc (' p=1 ')" >1</a><a href= "javascript: onclick=" Loadxmldoc ('? p=2 ') ">2</a></div > </body> </html>