更新时间:2023-01-12 10:58:28
是使用jQuery返回行和列号的代码,它必须有帮助
Jsfiddle链接
This is the code to return row and column number using jQuery, it must be helpful Jsfiddle link
$('td').on('click',function() {
var col = $(this).parent().children().index($(this));
var row = $(this).parent().parent().children().index($(this).parent());
alert('Row: ' + row + ', Column: ' + col);
});