Answers for "how to add an event to a checkbox"

2

checkbox event listener

checkbox = document.getElementById('conducted');

checkbox.addEventListener('change', e => {

    if(e.target.checked){
        //do something
    }

});
Posted by: Guest on November-05-2020

Code answers related to "how to add an event to a checkbox"

Code answers related to "Javascript"

Browse Popular Code Answers by Language