checkbox = document.getElementById('conducted'); checkbox.addEventListener('change', e => { if(e.target.checked){ //do something } });