I want to create links in record fields in DataTables from JSON data

后端 未结 6 1902
深忆病人
深忆病人 2020-12-28 19:09

I\'m creating a dataTables table to use as an archive of pages for a site that produces a comic strip. On that archives page, I\'d like to have the title of the comic be a l

6条回答
  •  借酒劲吻你
    2020-12-28 19:19

    $('#example').dataTable({
         "bProcessing": true,
         "bServerSide": true,
         "sAjaxSource": "archive/archive.txt"
         "fnRowCallback": function( nRow, aData, iDisplayIndex ) {
                $('td:eq(2)', nRow).html('' +
                    aData[2] + '');
                return nRow;
            },
    });
    

提交回复
热议问题