stackoverflow

View on Stackoverflow

Using pure JavaScript:

let checkbox = document.getElementById('checkboxID');

if(checkbox.checked) {
    alert('is checked');
} else {
  alert('no checked yet');
}