【发布时间】:2012-07-31 08:04:44
【问题描述】:
是否可以使用 dataTables 处理 THEAD 中的 2 行?
<table>
<thead>
## row 1
## row 2
</thead>
<tbody></tbody>
</table>
在第 1 行中,我需要 2 个单列和一个带有 colspan="3" 的列:
<tr>
<th></th>
<th></th>
<th colspan="3"></th>
</tr>
在第 2 行我需要 5 列:
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
但我有一种情况,我不需要 5 列,而只需要 3 列。
这可以动态生成吗?
更新:我试过了:http://datatables.net/release-datatables/examples/basic_init/complex_header.html
但是没有很好的例子它是如何生成的。
【问题讨论】:
-
表头中的两行代表什么事实?
-
"但我有一个案例,我不需要 5 列,而只需要 3 列。"你的意思是两行还是第二行 - 你能展示这两种情况的例子吗?
标签: javascript jquery html datatables