My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

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";
}

}