prop
由于在jQuery1.6以后.attr("checked")的返回结果是 checked,所以一般用下面两种方法获取选中状态:
$("#checkboxID").is(":checked");
//jQuery 1.6 +
$("#checkboxID").prop("checked");
选中checkbox:
//jQuery 1.6+
$("#checkboxID").prop("checked", true);
$("#checkboxID").prop("checked", false);
//jQuery 1.5 and below
$('#checkboxID').attr('checked','checked')
$('#checkboxID').removeAttr('checked')