1. 选框效果
$("#Form_sex_all").click(function(){ //点击全选
if($(this).attr("checked")){
$("input[name='Form\[sex\]\[\]']").attr("checked","checked");
}else{
$("input[name='Form\[sex\]\[\]']").removeAttr("checked");
}
});
$("input[name='Form\[sex\]\[\]']").click(function(){ //点击男女中任何一个
if($("input[name='Form\[sex\]\[\]']:gt(0):checked").length == 2){
$("input[name='Form\[sex\]\[\]']").attr("checked","checked");
}else{
$("#Form_sex_all").removeAttr("checked");
}
});