Chinaunix首页 | 论坛 | 博客
  • 博客访问: 560011
  • 博文数量: 107
  • 博客积分: 5229
  • 博客等级: 大校
  • 技术积分: 1158
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-08 10:50
文章分类
文章存档

2015年(1)

2014年(1)

2012年(5)

2011年(22)

2010年(12)

2009年(13)

2008年(34)

2007年(19)

我的朋友

分类:

2011-03-19 10:56:27

pagination插件
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="js/pagination/jquery.pagination.js"></script>
<link type="text/css" rel="stylesheet" href="js/pagination/pagination.css" />
</script>
<script type="text/javascript">
    function pageselectCallback(page_index, jq){
        var num = page_index;
        var start = 10*parseInt(num);
        var end = 10*(parseInt(num)+1);
        var content="";
        
        var hs = $("#1 div").length;
        $("#1 div").css("display","none")
        //$('#Searchresult').empty();
        for(i=start;i<end;i++){
            //alert()
            //var new_content = jQuery('#1 1div:eq('+i+')').clone().appendTo('#Searchresult');
            jQuery('#1 div:eq('+i+')').css("display","block");
        }
        return false;
    }
    function initPagination() {
        var num_entries = jQuery('#1 div').length;
        // Create content inside pagination element
        $("#Pagination").pagination(num_entries, {
            callback: pageselectCallback,
            items_per_page:10 // Show only one item per page
        });
     }
    $(document).ready(function(){
        initPagination();
    });
    ///////////////////////////
</script>
<title>无标题文档</title>
</head>

<body>
<div id="1" >
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12
      <input type="text" name="title" id="title" /></td>
  </tr>
  <tr>
    <td>111111
      </td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
<div>
<table width="100%" border="0">
  <tr>
    <td rowspan="2">1</td>
    <td>12</td>
  </tr>
  <tr><td>111111</td></tr>
</table>
</div>
</div><br /><div id="Pagination"></div><br />

</body>
</html>


阅读(1463) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~