我试图使用jQuery的数据表下面jQuery的数据表的特殊表头
<table id="tableau" class="display" width="100%" align="center">
<thead>
<tr>
<th colspan="2"></th>
<th colspan="2"></th>
<th rowspan="2"></th>
<th colspan="2"></th>
<th rowspan="2"></th>
</tr>
<tr>
<th colspan="2"></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
这个独立工作很好,但,当我尝试用jQuery数据表不会在工作中显示的标题,使表所有。除表格标题外没有任何内容显示。
$(document).ready(function() {
var table = $('#tableau').DataTable({
"scrollY": "500px",
"scrollCollapse": true,
"autoWidth": true,
"paging": false,
"processing": false,
"info": false,
"ordering": false,
"searching": false,
"data": [
{
"ta": "ta",
"tb": "tb",
"tc": "tc",
"td": "td",
"te": "te",
"tf": "tf",
"tg": "tg",
"th": "th"
},
{
"ta": "ta",
"tb": "tb",
"tc": "tc",
"td": "td",
"te": "te",
"tf": "tf",
"tg": "tg",
"th": "th"
},
],
"columns": [
{
"data": null,
"defaultContent": ''
},
{ "data": "ta" },
{ "data": null,
"defaultContent": ''
},
{ "data": "tb" },
{ "data": null,
"defaultContent": ''
},
{ "data": null,
"defaultContent": ''
},
{ "data": "tc" },
{ "data": null,
"defaultContent": ''
}
],
});
你已经尝试可以发布您的代码是什么? – soorapadman