The HTML code is as follows, primarily by setting the properties of the Aocolumndefs, which atargets represents the specific column. Hope to everyone useful ah, oneself also checked a lot of foreign language website, finally took this method
References to commonly used libraries are:
<script type= "Text/javascript" language= "JavaScript" src= "Js/jquery.js" ></script>
<script type= "Text/javascript" language= "JavaScript" src= "Js/jquery.jeditable.js" ></script>
<script type= "Text/javascript" language= "JavaScript" src= "Js/jquery.datatables.js" ></script>
<style>.col_class{color: #FFFFFF;}. Cos_class{color: #F5F683;} </style>
<script type= "Text/javascript" language= "JavaScript" >functioninitoverviewdatatable (URLSS) {ooverviewtable=$ (' #district1 '). dataTable ({"Bpaginate":false, "Bjqueryui":false, "Blengthchange":false, "Bfilter":false, "Bsort":false, "Binfo":true, "Idisplaylength": 10, "Bautowidth":true, "Sajaxsource": URLSS,"Olanguage": { "Sprocessing": "Loading in ...", "Semptytable": "No Data", "Sinfo": "" } , //Multi-language configuration"Aocolumndefs":[ {"Sclass": "Col_class", "atargets": [0]},{"Sclass": "Cos_class", "Atargets": [1]}] });} </script><table cellpadding= "0" cellspacing= "0" border= "0" class= "display" id= "District3" bgcolor= "#000000" > <thead> <tr> <th></th> <th></th> </TR&G T </thead></table>
jquery DataTables set different colors for each column