datatable mRender

@example
*    // Create a comma separated list from an array of objects
*    $(document).ready( function() {
*      var oTable = $('#example').dataTable( {
*        "sAjaxSource": "sources/deep.txt",
*        "aoColumns": [
*          { "mData": "engine" },
*          { "mData": "browser" },
*          {
*            "mData": "platform",
*            "mRender": "[, ].name"
*          }
*        ]
*      } );
*    } );
*
*  @example
*    // Use as a function to create a link from the data source
*    $(document).ready( function() {
*      var oTable = $('#example').dataTable( {
*        "aoColumnDefs": [
*        {
*          "aTargets": [ 0 ],
*          "mData": "download_link",
*          "mRender": function ( data, type, full ) {
*            return '<a href="'+data+'">Download</a>';
*          }
*        ]
*      } );
*    } );
*/

猜你喜欢

转载自zhangchengtest.iteye.com/blog/2197666