我使用
javascript插件dataTables.fixedHeader并用ajax填充数据.
现在我遇到了问题,每个数据列的宽度是动态的,并且标题保持在相同的静态宽度.
现在我遇到了问题,每个数据列的宽度是动态的,并且标题保持在相同的静态宽度.
码:
HTML:
@H_404_7@<table class="table table-striped table-bordered table-hover" id="custTable"> <thead> <tr> <th> ...... </th> <th> ...... </th> <th> ...... </th> ...... </tr> </thead> <tbody id="dataList"></tbody> </table>JS:
@H_404_7@table = $('#custTable').DataTable({ "dom": "frtiS","deferRender": true,});填充:
@H_404_7@$('#custTable').dataTable().fnAddData([ xyz,xyz,... ]);