Raga ho creato questa funzione per il controllo della form.
Sinceramente nn ho capito a cosa servono le due variabili(mail e ok),e nn so il significato nemmeno di with(document.form).
Potete aiutarmi???Grazie

function controllo_frm ()
{
var MAIL = document.form.email.value;
var ok = true;
with (document.form)
{
if (nome.value == ""){
alert("Inserisci il tuo nome!");
nome.focus();
return (false);
}
if (cognome.value ==""){
alert("Inserisci il tuo cognome!");
cognome.focus();
return (false);
}
if (email.value != "")
{
if (MAIL.indexOf("@") == -1)
{
ok = false;
}
if (ok == false)
{
alert("Indirizzo e-mail non valido!");
email.focus();
return (false);
}
}
else
{
alert("Inserisci la tua e-mail!");
email.focus();
return (false);
}
}
return (true);
}