日期:2014-05-16  浏览次数:20397 次

js 实现客户端无刷新分页效果
[/size]问题:

实现如下功能需求



1.table 按行数 分页

2.js 实现客户端无刷新效果

3.分页脚注 比较美观

4.可扩展 维护性比较好



Html代码  收藏代码

    <span style="font-size: x-small;"><html version="-//W3C//DTD HTML 4.01 Transitional//EN"> 
     
        <head> 
            <style type="text/css">     
                .pg-normal { 
                    color: black; 
                    font-weight: normal; 
                    text-decoration: none;     
                    cursor: pointer;     
                } 
                .pg-selected { 
                    color: black; 
                    font-weight: bold;         
                    text-decoration: underline; 
                    cursor: pointer; 
                } 
            </style> 
             
            <script type="text/javascript" src="paging.js"></script> 
        </head> 
         
        <body> 
            <form action="" method="get" enctype="application/x-www-form-urlencoded"> 
            <table id="results"> 
                <tr> 
                    <th>#</th> 
                    <th>field</th> 
                </tr> 
                <tr> 
                    <td>1</td> 
             &