Datatables 적용된 테이블에 tfoot을 추가하였더니 아래와 같은 오류발생
uncaught typeerror: cannot read property 'nodename' of null
thead의 컬럼 개수와 tfoot의 커럼 개수가 동일하지 않아 발생한 오류
<table id="listTable" class="table-list table table-sm table-bordered table-hover">
<thead>
<tr>
<th class="no_toggle"></th> <%-- dtr-control 위치 --%>
<th>출납일</th>
<th>구분</th>
<th>계정번호</th>
<th>계정명</th>
<th>적요</th>
<th>입금</th>
<th>출금</th>
<th>비고</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<th colspan="5">합 계</th>
<th class="text-right"><span id="span_input_total"></span></th>
<th class="text-right"><span id="span_output_total"></span></th>
<th></th>
</tr>
</tfoot>
</table>
thead의 컬럼은 9개인데, tfoot은 8개라서 tfoot에 컬럼 하나 추가해주니 제대로 나옴
<table id="listTable" class="table-list table table-sm table-bordered table-hover">
<thead>
<tr>
<th class="no_toggle"></th> <%-- dtr-control 위치 --%>
<th>출납일</th>
<th>구분</th>
<th>계정번호</th>
<th>계정명</th>
<th>적요</th>
<th>입금</th>
<th>출금</th>
<th>비고</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<th></th>
<th colspan="5">합 계</th>
<th class="text-right"><span id="span_input_total"></span></th>
<th class="text-right"><span id="span_output_total"></span></th>
<th></th>
</tr>
</tfoot>
</table>
'DEV' 카테고리의 다른 글
[AWS RDS] Cannot modify a default parameter group. (0) | 2021.11.26 |
---|