//$(".435__1").attr("checked", true);
//$(".435__0").removeAttr("checked");
$("."+pid+"__1").attr("checked", true);
$("."+pid+"__0:checked").removeAttr("checked");

 

 

$('input:checkbox').click(function () {
var projid_name = $(this).attr("name");
var projid_name_str= new Array(); //定义一数组
projid_name_str=projid_name.split("_");
pname_1 = projid_name_str[0]+"_"+projid_name_str[1]+"_1";
pname_0 = projid_name_str[0]+"_"+projid_name_str[1]+"_0";
if(projid_name_str[2]==1){
$("input[name="+pname_0+"]:checked").removeAttr("checked");
}else if(projid_name_str[2]==0){
$("input[name="+pname_1+"]:checked").removeAttr("checked");
}
});

 

 

/*
$("#435 :checkbox[checked]").each(function(i){
valArr[i] = $(this).val();
});
*/

 

posted on 2015-07-01 19:23  程序猿的笔记  阅读(354)  评论(0编辑  收藏  举报