📅  最后修改于: 2022-03-11 15:01:56.746000             🧑  作者: Mango
//selected checkbox alert boolen value return
$('#test').click(function() {
alert("Checkbox state (method 1) = " + $('#test').prop('checked'));
alert("Checkbox state (method 2) = " + $('#test').is(':checked'));
});
Check me:
//@sujaY