Closed SandroHc closed 6 months ago
Preserves <tfoot> and <caption> tags from the original HTML table in the rendered datatable.
<tfoot>
<caption>
See the following example for a practical use case.
<table id="example-table"> <caption>List of smartphones.</caption> <!-- custom caption --> <thead> <tr> <th>Model</th> <th>Price</th> </tr> </thead> <tbody> <tr> <td>iPhone 14</td> <td>$699</td> </tr> <tr> <td>iPhone 15</td> <td>$799</td> </tr> </tbody> <tfoot style="font-weight: bold"> <!-- custom footer --> <tr> <td>Total</td> <td>$1498</td> </tr> </tfoot> </table> <script> const dt = new DataTable("example-table", { // This also works: // caption: "List of smartphones." }); </script>
Preserves
<tfoot>
and<caption>
tags from the original HTML table in the rendered datatable.See the following example for a practical use case.