ciao, per testare la check box devi fare cosi
codice:
if (document.getElementById("consenti").checked){
tuo codice
}