<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 325,  comments - 25,  trackbacks - 0

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>無標題文檔</title>
    <script type="text/javascript" language="javascript">
    // JavaScript Document
    /**//**
    * js分頁類
    * @param iAbsolute 每頁顯示記錄數
    * @param sTableId 分頁表格屬性ID值,為String
    * @param sTBodyId 分頁表格TBODY的屬性ID值,為String,此項為要分頁的主體內容
    * @Version 1.0.0
    * @author 辛現寶 2007-01-15 created
    * var __variable__; private
    * function __method__(){};private
    */
    function Page(iAbsolute,sTableId,sTBodyId)
    {
    this.absolute = iAbsolute; //每頁最大記錄數
    this.tableId = sTableId;
    this.tBodyId = sTBodyId;
    this.rowCount = 0;//記錄數
    this.pageCount = 0;//頁數
    this.pageIndex = 0;//頁索引
    this.__oTable__ = null;//表格引用
    this.__oTBody__ = null;//要分頁內容
    this.__dataRows__ = 0;//記錄行引用
    this.__oldTBody__ = null;
    this.__init__(); //初始化;
    };
    /**//*
    初始化
    */
    Page.prototype.__init__ = function(){
    this.__oTable__ = document.getElementById(this.tableId);//獲取table引用
    this.__oTBody__ = this.__oTable__.tBodies[this.tBodyId];//獲取tBody引用
    this.__dataRows__ = this.__oTBody__.rows;
    this.rowCount = this.__dataRows__.length;
    try{
    this.absolute = (this.absolute <= 0) || (this.absolute>this.rowCount) ? this.rowCount : this.absolute;
    this.pageCount = parseInt(this.rowCount%this.absolute == 0
    ? this.rowCount/this.absolute : this.rowCount/this.absolute+1);
    }catch(exception){}

    this.__updateTableRows__();
    };
    /**//*
    下一頁
    */
    Page.prototype.nextPage = function(){
    if(this.pageIndex + 1 < this.pageCount){
    this.pageIndex += 1;
    this.__updateTableRows__();
    }
    };
    /**//*
    上一頁
    */
    Page.prototype.prePage = function(){
    if(this.pageIndex >= 1){
    this.pageIndex -= 1;
    this.__updateTableRows__();
    }
    };
    /**//*
    首頁
    */
    Page.prototype.firstPage = function(){
    if(this.pageIndex != 0){
    this.pageIndex = 0;
    this.__updateTableRows__();
    }
    };
    /**//*
    尾頁
    */
    Page.prototype.lastPage = function(){
    if(this.pageIndex+1 != this.pageCount){
    this.pageIndex = this.pageCount - 1;
    this.__updateTableRows__();
    }
    };
    /**//*
    頁定位方法
    */
    Page.prototype.aimPage = function(iPageIndex){
    if(iPageIndex > this.pageCount-1){
    this.pageIndex = this.pageCount - 1;
    }else if(iPageIndex < 0){
    this.pageIndex = 0;
    }else{
    this.pageIndex = iPageIndex;
    }
    this.__updateTableRows__();
    };
    /**//*
    執行分頁時,更新顯示表格內容
    */
    Page.prototype.__updateTableRows__ = function(){
    var iCurrentRowCount = this.absolute * this.pageIndex;
    var iMoreRow = this.absolute+iCurrentRowCount > this.rowCount ? this.absolute+iCurrentRowCount - this.rowCount : 0;
    var tempRows = this.__cloneRows__();
    //alert(tempRows === this.dataRows);
    //alert(this.dataRows.length);
    var removedTBody = this.__oTable__.removeChild(this.__oTBody__);
    var newTBody = document.createElement("TBODY");
    newTBody.setAttribute("id", this.tBodyId);

    for(var i=iCurrentRowCount; i < this.absolute+iCurrentRowCount-iMoreRow; i++){
    newTBody.appendChild(tempRows[i]);
    }
    this.__oTable__.appendChild(newTBody);
    /**//*
    this.dataRows為this.oTBody的一個引用,
    移除this.oTBody那么this.dataRows引用將銷失,
    code:this.dataRows = tempRows;恢復原始操作行集合.
    */
    this.__dataRows__ = tempRows;
    this.__oTBody__ = newTBody;
    //alert(this.dataRows.length);
    //alert(this.absolute+iCurrentRowCount);
    //alert("tempRows:"+tempRows.length);

    };
    /**//*
    克隆原始操作行集合
    */
    Page.prototype.__cloneRows__ = function(){
    var tempRows = [];
    for(var i=0; i<this.__dataRows__.length; i++){
    /**//*
    code:this.dataRows[i].cloneNode(param),
    param = 1 or true:復制以指定節點發展出去的所有節點,
    param = 0 or false:只有指定的節點和它的屬性被復制.
    */
    tempRows[i] = this.__dataRows__[i].cloneNode(1);
    }
    return tempRows;
    };
    window.onload = function(){
    page = new Page(6,'table1','group_one'); };
    </script>
    </head>

    <body>

    <table id="table1" border="0" width="486">
    <thead>
    <tr style="background-color:#CCCCCC;">
    <th style="cursor:pointer;">Last Name</th>
    <th style="cursor:pointer;">First Name</th>
    <th style="cursor:pointer;">Birthday</th>
    <th style="cursor:pointer;">Siblings</th>
    </tr>
    </thead>
    <tbody id="group_one">
    <tr style="background-color:#f3f3f3">
    <td>Smith</td>
    <td>John</td>
    <td>7/12/1978</td>
    <td>2</td>
    </tr>
    <tr style="background-color:#B4D6FC">
    <td>Johnson</td>
    <td>Betty</td>
    <td>10/15/1977</td>
    <td>4</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Henderson</td>
    <td>Nathan</td>
    <td>2/25/1949</td>
    <td>1</td>
    </tr>
    <tr style="background-color:#B4D6FC">
    <td>Williams</td>
    <td>James</td>
    <td>7/8/1980</td>
    <td>4</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Gilliam</td>
    <td>Micheal</td>
    <td>7/22/1949</td>
    <td>1</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Smith</td>
    <td>John</td>
    <td>7/12/1978</td>
    <td>2</td>
    </tr>
    <tr style="background-color:#B4D6FC">
    <td>Johnson</td>
    <td>Betty</td>
    <td>10/15/1977</td>
    <td>4</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Henderson</td>
    <td>Nathan</td>
    <td>2/25/1949</td>
    <td>1</td>
    </tr>
    <tr style="background-color:#B4D6FC">
    <td>Williams</td>
    <td>James</td>
    <td>7/8/1980</td>
    <td>4</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Gilliam</td>
    <td>Micheal</td>
    <td>7/22/1949</td>
    <td>1</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Smith</td>
    <td>John</td>
    <td>7/12/1978</td>
    <td>2</td>
    </tr>
    <tr style="background-color:#B4D6FC">
    <td>Johnson</td>
    <td>Betty</td>
    <td>10/15/1977</td>
    <td>4</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Henderson</td>
    <td>Nathan</td>
    <td>2/25/1949</td>
    <td>1</td>
    </tr>
    <tr style="background-color:#B4D6FC">
    <td>Williams</td>
    <td>James</td>
    <td>7/8/1980</td>
    <td>4</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Gilliam</td>
    <td>Micheal</td>
    <td>7/22/1949</td>
    <td>1</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Smith</td>
    <td>John</td>
    <td>7/12/1978</td>
    <td>2</td>
    </tr>
    <tr style="background-color:#B4D6FC">
    <td>Johnson</td>
    <td>Betty</td>
    <td>10/15/1977</td>
    <td>4</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Henderson</td>
    <td>Nathan</td>
    <td>2/25/1949</td>
    <td>1</td>
    </tr>
    <tr style="background-color:#B4D6FC">
    <td>Williams</td>
    <td>James</td>
    <td>7/8/1980</td>
    <td>4</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Gilliam</td>
    <td>Micheal</td>
    <td>7/22/1949</td>
    <td>1</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Smith</td>
    <td>John</td>
    <td>7/12/1978</td>
    <td>2</td>
    </tr>
    <tr style="background-color:#B4D6FC">
    <td>Johnson</td>
    <td>Betty</td>
    <td>10/15/1977</td>
    <td>4</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Henderson</td>
    <td>Nathan</td>
    <td>2/25/1949</td>
    <td>1</td>
    </tr>
    <tr style="background-color:#B4D6FC">
    <td>Williams</td>
    <td>James</td>
    <td>7/8/1980</td>
    <td>4</td>
    </tr>
    <tr style="background-color:#f3f3f3">
    <td>Gilliam</td>
    <td>Micheal</td>
    <td>7/22/1949</td>
    <td>1</td>
    </tr>
    </tbody>
    </table>
    <span id="s"></span>
    <table><tr><td><a href="#" onclick="page.nextPage();">下一頁</a></td><td><a href="#" onclick="page.prePage();">上一頁</a></td><td><span id="pageindex"></span></td></tr></table>
    </body>
    </html>

    <2011年12月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

     

    長春語林科技歡迎您!

    常用鏈接

    留言簿(6)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    相冊

    收藏夾

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 在线a毛片免费视频观看| 免费在线观看的网站| 亚洲色偷拍区另类无码专区| 老子影院午夜伦不卡亚洲| 成人免费a级毛片无码网站入口| 一级毛片aaaaaa视频免费看| 免费大香伊蕉在人线国产| 国产成人精品日本亚洲专区| 一级一看免费完整版毛片| 中文字幕中韩乱码亚洲大片| 西西人体免费视频| 亚洲国产精品第一区二区| 美女被cao网站免费看在线看| 亚洲AV无码不卡在线播放| 最近免费中文字幕mv在线电影| 18禁超污无遮挡无码免费网站国产| 亚洲一区无码中文字幕乱码| 最近2019中文免费字幕| 亚洲成a人无码亚洲成www牛牛| 亚洲AⅤ优女AV综合久久久| 国产精品黄页免费高清在线观看| 亚洲伊人色欲综合网| 8888四色奇米在线观看免费看| 亚洲av无码一区二区三区天堂古代| 在线免费观看毛片网站| 日韩在线视频线视频免费网站| 亚洲人成人网站色www| 日韩欧毛片免费视频| 精品久久亚洲一级α| 国产精品国产亚洲精品看不卡| 日本免费xxxx| 黄页免费视频播放在线播放| 亚洲婷婷五月综合狠狠爱| 日本片免费观看一区二区| 日日摸日日碰夜夜爽亚洲| 亚洲成AV人在线播放无码 | 亚洲国产精品久久人人爱| 亚洲免费观看视频| 亚洲AV无码成人专区| 亚洲情侣偷拍精品| 免费精品国产自产拍在线观看图片|