业务需求是当用户勾选中的时候删除数据,取消勾选的时候数据取消 //单选事件,获取到每行数据ID $('.checkItem').change(function(){ // checkItem是给radio添加的class类 var index=$(this).parent().parent().index() if($(this).attr('checked')){//如果被选中 $(this).parent().parent().css('background','#dff0d8') $('.