manipulate checkbox javascript as toggle code example Example: toggle checkbox in JavaScript checkbox.checked = !checkbox.checked;