📅  最后修改于: 2022-03-11 15:01:57.606000             🧑  作者: Mango
//using plane javascript
if(document.getElementById('on_or_off_checkbox').checked) {
//I am checked
}
//using jQuery
if($('#on_or_off_checkbox').is(':checked')){
//I am checked
}