jqueryデータテーブルがあり、2つの列の合計を計算したい。テーブルの 初期jqueryデータテーブル内の2つの列の合計を計算する
$('#myTable').DataTable({
autoWidth: false,
searching: false,
...
initComplete: function (settings, json) {
// calculate sum and inject into second and third row in the footer
});
});
<table id="myTable">
<thead>
<tr>
<th>Id</th>
<th>Time one</th>
<th>Time two</th>
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
</table>
アップデート:この列内の
バレスは似ています:
=====================
| 1 | 01:15 | 10:00 |
=====================
| 9 | 11:44 | 0:120
|
正確にあなたの質問は何ですか?あなたはどんな問題に遭遇しましたか? –
私は質問を言い換えることができます:私は、たとえば、3番目の列のフッターに合計します。 – user1765862