javascript check checkbox programmatically
snippet in javascript

javascript check checkbox programmatically

user2877

// Check
document.getElementById("checkbox").checked = true;

// Uncheck
document.getElementById("checkbox").checked = false;