function check_registration(){ if(document.registration.mail.value.indexOf("@")==-1 || document.registration.mail.value.indexOf(".")==-1){ alert("Inserire correttamente l'indirizzo email."); return false; } if(document.registration.password.value==""){ alert("Inserire la password scelta"); return false; } if(document.registration.name.value==""){ alert("Inserire il nome."); return false; } if(document.registration.surname.value==""){ alert("Inserire il nome."); return false; } document.registration.submit(); }