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

블로그 메뉴

    공지사항

    인기 글

    태그

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

    최근 댓글

    최근 글

    티스토리

    hELLO · Designed By 정상우.
    촨
    DEV

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

    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.
      촨
      촨

      티스토리툴바

      단축키

      내 블로그

      내 블로그 - 관리자 홈 전환
      Q
      Q
      새 글 쓰기
      W
      W

      블로그 게시글

      글 수정 (권한 있는 경우)
      E
      E
      댓글 영역으로 이동
      C
      C

      모든 영역

      이 페이지의 URL 복사
      S
      S
      맨 위로 이동
      T
      T
      티스토리 홈 이동
      H
      H
      단축키 안내
      Shift + /
      ⇧ + /

      * 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.