asked
[Renewal] Introduction to JavaScript in Zero Seconds through Coding Self-Study
Parent-child relationship, pseudoarray, every, some, flat
Written on
·
206
0
const row = target.parentNode.row; const cell = target.cell;
const row = target.parentNode.rowIndex; const cell = target.cellIndex;
계속 변수명 바꾸면서 왜 안 되나 싶었는데 idex가 메서드였군요..
혹시 위 사진처럼 cellIndex를 확인 할 수 있는 방법이 있을까요?
Answer 1
메서드는 아니고 프로퍼티(속성)입니다.
console.log(target.cellIndex) 해보심 됩니다.
아하 그렇군요
아하 그렇군요