if ($("#id").is(":checked")) {alert("Y");} else {alert("N");}
if ($("#id").attr("checked") == "checked") {alert("Y");} else {alert("N");}
转:https://www.cnblogs.com/jitash/p/5112252.html