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

}

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct