use javascript to check a checkbox code example
Example 1: dom check a checkbox
document.getElementById("myCheck").checked = true;
Example 2: javascript check checkbox programmatically
// Check
document.getElementById("checkbox").checked = true;
// Uncheck
document.getElementById("checkbox").checked = false;