【发布时间】:2014-08-11 14:03:49
【问题描述】:
我正在使用jquery datatables 来显示数据。
<table class="report-tbl table-bordered" cellspacing="0" width="100%" id="report-tbl">
<thead>
<tr>
<th></th>
<th><span contenteditable="">Side A</span></th>
<th><span contenteditable="">Sode B</span></th>
<th><span contenteditable="">Side C</span></th>
</tr>
</thead>
<tbody id="rowcontainer">
</tbody>
</table>
我想发生的是,当我点击一个按钮时,数据表会添加一个列'Side D'。
您对我如何做到这一点有任何想法吗?原因基于我在谷歌看到的。 jQuery data-tables 尚不支持添加/删除动态列。
谢谢,
【问题讨论】:
-
您是否考虑过从一开始就将其放入并切换显示?
-
这只是我要添加的示例列。但有可能超过 2 列。
标签: javascript jquery datatables