解决方法:加off解除委托的事件
$('.producttable tbody').on('click','tr',function(){
if ($(this).hasClass('rchecked')){
$(this).removeClass(
'rchecked').find('input').prop('checked',
false);
} else {
$(this).closest('tbody').find('tr').not($(this).index()).removeClass('rchecked');
$(this).addClass('rchecked').find('input').prop("checked",
true);
}
})
$('.producttable tbody').off('click','tr').on('click','tr',function(){
//debugger
//alert('产品点击事件')
if ($(this).hasClass('rchecked')){
$(this).removeClass(
'rchecked').find('input').prop('checked',
false);
} else {
$(this).closest('tbody').find('tr').not($(this).index()).removeClass('rchecked');
$(this).addClass('rchecked').find('input').prop("checked",
true);
}
})