javascript to check and uncheck a checkbox code example
Example 1: javascript check uncheck checkbox
document.getElementById("myCheckBoxID").checked = true; // Check
document.getElementById("myCheckBoxID").checked = false;// Uncheck
Example 2: checked unchecked through js
document.getElementById("checkbox_id").checked;
//If checked returns true;
//else returns false;