how to check an element type is checkbox in javascript code example Example: dom check a checkbox document.getElementById("myCheck").checked = true;