table작업하시는 분들에게 매우 유용하지 않을까 싶습니다

클릭한 td의 rownum과 colnum을 넘겨주는 소스입니다.



$('td').click(function(){

  var col = $(this).parent().children().index($(this));

  var row = $(this).parent().parent().children().index($(this).parent());

  alert('Row: ' + row + ', Column: ' + col);

});



https://stackoverflow.com/questions/788225/table-row-and-column-number-in-jquery

https://stackoverflow.com/questions/788225/table-row-and-column-number-in-jquery

https://stackoverflow.com/questions/788225/table-row-and-column-number-in-jquery

'javascript & jquery' 카테고리의 다른 글

[jQuery] jQuery append 이후 event 먹통 현상 대처  (0) 2020.02.12

+ Recent posts