标签:put click pid input var str nbsp check his
//$(".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();
});
*/
标签:put click pid input var str nbsp check his
原文地址:http://www.cnblogs.com/lijingwen-99/p/6904832.html