let totalRow = $(‘#table’).find(‘tr’)
let row = $(val).parent().parent().find(‘td’)
let value = $(row).parent().prevAll().length + 1 // 当前行 下标
let col = $(row).prevAll().length // 当前列 下标
console.log(value, col);
获取table当前行和当前列下标
最新推荐文章于 2024-03-05 10:36:32 发布