1//js
2var checkbox = document.querySelector("input[name=checkbox]");
3
4checkbox.addEventListener( 'change', function() {
5 if(this.checked) {
6 // Checkbox is checked..
7 } else {
8 // Checkbox is not checked..
9 }
10});
11
12//jquery
13$('input[name=checkbox]').change(function(){
14 if($(this).is(':checked')) {
15 // Checkbox is checked..
16 } else {
17 // Checkbox is not checked..
18 }
19});
1checkbox = document.getElementById('conducted');
2
3checkbox.addEventListener('change', e => {
4
5 if(e.target.checked){
6 //do something
7 }
8
9});
10