if (document.getElementById("checkboxID").checked) {
alert("checkobx is checked");
}
if ($("#checkboxID").prop("checked")) {
alert("checkbox is checked");
}
或
if ($("#checkboxID").is(":checked")) {
alert("checkbox is checked");
}
原文:http://www.cnblogs.com/loveyunk/p/6444383.html