标签:length drawcall query rownum ble function call get tap
superviseQueryDataTable = $(‘#superviseQueryDataTable‘).DataTable({
//其他属性自己定义
"aoColumns":[{"mDataProp":"对应的属性"},
"fnDrawCallback": function( oSettings ) {
showRowNum1();
}
});
function showRowNum1(){
var oTable = $(‘#superviseQueryDataTable‘).dataTable();
var nDatas = oTable.fnGetData();
var nTrs = oTable.fnGetNodes();
for(var i = 0; i < nTrs.length; i++){
var nTr = nTrs[i];
var nData = oTable.fnGetData(nTrs[i]);
var nTd = nTr.cells[0];
$(nTd).html(i+1);
}
}
标签:length drawcall query rownum ble function call get tap
原文地址:http://www.cnblogs.com/revolve/p/7919972.html