<script type="text/javascript">
$(
function() {
$(
"#CheckBox_all").click(function() {
$(
"input[type='checkbox']").attr('checked', this.checked);
});
$(
"input[type='checkbox']").not("#CheckBox_all").click(function() {
$(
"#CheckBox_all").attr('checked', $("input[type='checkbox']").not("#CheckBox_all").length == $("input:checked").not("#CheckBox_all").length);
});
});
</script>

 

相关文章: