촨
개발 끄적끄적
촨
전체 방문자
오늘
어제
  • 분류 전체보기
    • STORY
    • Algorithm
    • JAVA
    • SPRING
    • DEV
      • django
      • CSS
    • EROWM
    • ETC
    • Python
    • 취업

블로그 메뉴

    공지사항

    인기 글

    태그

    • IntelliJ
    • Maven clean
    • 면접정보
    • Spring
    • mybatis
    • N+1문제
    • Collection
    • Github
    • httpurlconnection
    • merge
    • payco
    • POST
    • FormValues
    • maven
    • NHN
    • JSON

    최근 댓글

    최근 글

    티스토리

    hELLO · Designed By 정상우.
    촨

    개발 끄적끄적

    DEV

    [Datatables] uncaught typeerror: cannot read property 'nodename' of null

    2021. 6. 17. 12:54

    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
      'DEV' 카테고리의 다른 글
      • [AWS RDS] Cannot modify a default parameter group.
      촨
      촨

      티스토리툴바