2011-12-12 65 views

回答

4

希望這將有助於

$(document).ready(function() { 
$('#example').dataTable({ 
    "sDom": 'T<"clear">lfrtip', 
    "oTableTools": { 
     "aButtons": [ 
      { 
       "sExtends": "csv", 
       "sButtonText": "Special columns", 
       "mColumns": [ 0, 1, 4 ] 
      }, 
      { 
       "sExtends": "csv", 
       "sButtonText": "Visible columns", 
       "mColumns": "visible" 
      } 
     ] 
    } 
}); 
}); 

檢查此鏈接 http://datatables.net/extras/tabletools/button_options#collection_options