jquery plugins —— datatables 增加行号
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>

浙公网安备 33010602011771号