码迷,mamicode.com
首页 > Web开发 > 详细

jquery plugins —— datatables 增加行号

时间:2016-02-26 14:16:01      阅读:479      评论:0      收藏:0      [点我收藏+]

标签:

table = $("#Table").DataTable({
                "rowCallback": function (row, data, dataIndex) {
                    //增加行号
                    $(‘td:eq(0)‘, row).html(dataIndex + table.page.info().length * table.page() + 1);
                }});
<table id="Table">
<thead>
      <tr style="text-align:center;">
          <th style="text-align:center;">
          序号
          </th>

      </tr>
</thead>
</table>

 

jquery plugins —— datatables 增加行号

标签:

原文地址:http://www.cnblogs.com/xbzhu/p/5220052.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!