daratable Api,随记

/* var api = this.api();
 var anArray = eval(api.rows({page: 'current'}).data());
 $.each(anArray, function (n, value) {
     var x = 'oc' + value.oc_id;
     var o = document.getElementById(x);
     var h = o.parentNode.offsetHeight;  //高度*!/
     o.style.marginTop = (h / 2 - 12);

});*/

columns: [
    {
        "mData": "id",
        createdCell: function (nTd, sData, oData, iRow, iCol) {
            var startnum = this.api().page() * (this.api().page.info().length);
            $(nTd).css({'display':' table-cell','vertical-align': 'middle','text-align': 'middle'})
            $(nTd).html('
' + (iRow + 1 + startnum) + '
'
);//分页行号累加:$(nTd).html(iRow+1); } },。。。。。。。。。。。。。。。。。。。。。。

你可能感兴趣的:(daratable Api,随记)