javascript:dom:nodelist

NodeList

array가 아님. forEach() 명령어는 존재. Array.from()으로 배열로 전환 가능
  • readonly NodeList.length Number: 노드의 수
  • NodeList.item(index)Node: NodeList.[index] 연산자와 동일
  • NodeList.entryies()[unsinged integer, Node]iterator
  • NodeList.keys()Nodeiterator
  • NodeList.values()unsigned integeriterator
  • NodeList.forEach(callback)void
    NodeList.forEach(callback, thisArg)undefined
    • callback function
      • currentValue: 처리중인 현재 요소
      • currentIndex: 현재 요소의 인덱스
      • listObj: NodeList 객체
    • thisArg: this에 대입하는 값
  • javascript/dom/nodelist.txt
  • 마지막으로 수정됨: 2024/02/11 11:19
  • 저자 writer