我試圖使用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