我有一个
jquery脚本,它禁用一行中的所有复选框并将它们标记为已选中:
$(function() { enable_cb(); $("#group1").click(enable_cb); }); function enable_cb() { if (this.checked) { $("input.group1").attr("disabled",true); $("input.group1").attr("checked",true); } else { $("input.group1").removeAttr("disabled","checked"); } }
这是我的html:http://jsfiddle.net/3fksv/16/的小提琴
我希望其余的复选框再次显示为活动状态,并在取消选中该复选框时取消选中.我的剧本中我做错了什么?