js 节点和checkbox 使用案例
//修改时候有默认的资料
var allmaterialcheck=function (obj){
var value=$(obj).children("div").html();
var array = value.split(",");
var obja = $("#allmaterialscheck").children("input");
$.each(obja,function(i){
for(var i=0;i<array.length;i++){
if($(this).val()==array[i]){
var vlaueyy =$(this).prop('checked');
if(!vlaueyy){
$(this).prop("checked",true);
break;
}
}else{
var vlauexx =$(this).prop('checked');
if(vlauexx){
$(this).removeAttr("checked");
}
}
}
});
}