mRender 已重命名为 columns.render。您可以在此处查看 DataTables 1.10 中您可能在 1.9 中使用的所有内容的等效名称:http://www.datatables.net/upgrade/1.10-convert
来自文档 (http://datatables.net/reference/option/columns.render) 的 columns.render 示例:
以逗号分隔的列表:
$('#example').dataTable( {
"ajaxSource": "sources/deep.txt",
"columns": [
{ "data": "engine" },
{ "data": "browser" },
{
"data": "platform",
"render": "[, ].name"
}
]
} );
作为一个函数:
$('#example').dataTable( {
"columnDefs": [ {
"targets": 0,
"data": "download_link",
"render": function ( data, type, full, meta ) {
return '<a href="'+data+'">Download</a>';
}
} ]
} );
来自@VivienPipo 下面的补充:
"render": function (data, type, full, meta) {
if (type == "display") {
return format_text_function(data);
}
return data;
}