Skip to content

Instantly share code, notes, and snippets.

@masautt
Created September 3, 2019 21:46
Show Gist options
  • Save masautt/288b7f172092d2196e8c58f8ee9f1ce3 to your computer and use it in GitHub Desktop.
Save masautt/288b7f172092d2196e8c58f8ee9f1ce3 to your computer and use it in GitHub Desktop.
How can you check whether a box is checked using JavaScript?
let checkBox = document.getElementById("myCheckBox");
console.log(checkBox.checked) //--> true or false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment