Sign in
Log inSign up

Cannot read property 'checked' of null

Mohanraj's photo
Mohanraj
·Sep 12, 2019

function tick(id) { let newid = 'inputtext'+id; let inputcheck = 'inputcheck'+id; var check = document.getElementById(newid); if (document.getElementById(inputcheck).checked ) { check.style = "text-decoration: line-through"; }

else if(document.getElementById(inputcheck).checked = false) {
  check.style = "text-decoration: none";
}

}