版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/farmwang/article/details/82667178
$('#tblinvoice tbody').on('change', 'tr input[name="namenetprice"]', function () {
// var dt = $('#tblinvoice').row($(this).parents('tr')).data();
// console.log($(this).val()); //input 对应值
//var rows = $(this).parent().children("td:eq(4)").find("input").val();
// alert(rows);
var trSeq = $(this).parent().parent().prevAll().length; //input 对应行号
console.log(trSeq);
console.log($(this).parent().prevAll().length); //input 对应列号
var recId = $("#tblinvoice tbody>tr:eq(" + trSeq + ") td:eq(4)").find("input").val();
});