<td>안에 이벤트로 this넘겨서 rowIndex 못 구하나요?
글쓴이: kknd345 / 작성시간: 월, 2005/05/09 - 4:22오후
DHTML 에서 <td>안에 이벤트로 this넘겨서 rowIndex 못 구하나요?
보통
<tr onclick="functionName(this)">이렇게하면 자바쪽에서 this.rowIndex해서 row 가 몇 번 째 줄인가 알수 있잖아요
그런데 전
<tr>
<td><input type=button value="X" onClick="del(this)"></td>
</tr>
이런 식이거든요
버튼 클릭했을때 this 포인터 넘겨주면요 . 위에서 처럼 rowIndex 못 구하나요?
Forums:
td에는 rowIndex 속성이 없으니까요.this.parentE
td에는 rowIndex 속성이 없으니까요.
this.parentElement로 넘겨보세요.
이런걸써본적은 있습니다만....... 역으로도 되지 않을까요? ro
댓글 달기