jquery 选中 checkbox undefined

 "aoColumnDefs":
                 [
                   {'bVisible': false, 'aTargets': []},
                   {'bSortable': false, 'aTargets': []},
                 {
//                      "sTitle": "we",
//                      "sClass" :"center",
                        "sWidth": "10%",
                        "mData" : null,
                        "aTargets" : [ 0 ],
                        "mRender": function(data){
                            return "<input type='checkbox' name='productCheckbox' id='"+data.businessId+"' value='"+data.businessId+"'>";
                        }
                    }, 
  success: function(data){
                        console.log("checkboxselected============="+data.actConfg);
                        $(data.actConfg).each(function(i,item){
                            console.log("checkboxselected============="+item.businessId);

                            //$('input:checkbox').eq(0).attr("checked",'true');
                            $(":checkbox[value='22']").prop("checked",true);
                            $("input:checkbox[value='"+item.businessId+"']").attr('checked','true');
                            //$("input[id='"+item.businessId+"']:checkbox").attr("checked",true)
                            console.log("hhhhhhhhhhhhh=============");
                        });
                        }

操作不了动态生成的,静态直接写的可以为什么? $("input:checkbox[value='"+item.businessId+"']")这个取到的是undefined

 $("input:checkbox[value='"+item.businessId+"']").attr('checked','true');
 改成
 $("input:checkbox[value='"+item.businessId+"']").prop('checked','true');

 对于
  checked, selected 或者 disabled 使用prop()方法设置true和false