<input class="checkbox" onclick="checkAttack(this);" id="A2" name="A2" value="2" type="checkbox">
<label class=" " for="A2">А2</label>
x = document.querySelectorAll("checkbox");
setInterval(function(){
if(x.checked == true){
x.checked = false;
}else{
x.checked = true;
}
}, 1000);