You need to capture the click event of your button and then check whether the checkbox is clicked or not. If not, you can send the alert and return false (be sure to do this otherwise the form will be submitted anyway).
$('#reset').click(function () {
if (!$('#confirm').is(':checked')) {
alert('not checked');
return false;
}
});
1
solved Display alert if checkbox isn’t checked on button click [closed]