$('input[name=groupCheckBox]').click(function(){
if($(this).parent().find("input[name='groupCheckBox']:checked").length >= 3)
{
$(this).removeAttr("checked");
alert("图片雕刻行最多选择两个分组!")
} else if($(this).parent().find("input[name='groupCheckBox']:checked").length < 1)
{
$(this).prop("checked",true);
alert("图片雕刻行至少选择一个分组!")
}
}); |