Réponse acceptée !
Voila voila ... j'ai fini par trouver.
<script type="text/javascript">
function check(champs)
{
if((champs[0].value == '' ) && (champs[1].value == ''))
{
alert('Indiquez votre pseudo, SVP.');
alert('Indiquez votre mail, SVP.');
return(false);
}
if(champs[0].value == '')
{
alert('Indiquez votre pseudo, SVP.');
return(false);
}
if(champs[1].value == '')
{
alert('Indiquez votre mail, SVP.');
return(false);
}
var pseudo = /^[\w\_\9]+$/;
var mail = /^[\w\-]+(\.[\w\-]+)*@[\w\-]+(\.[\w\-]+)*\.[\w\-]{2,}$/;
var reponse=pseudo.test(champs[0].value)
var reponse2=mail.test(champs[1].value)
if ((!reponse) && (!reponse2))
{
alert("Pseudo invalide!");
alert("Adresse mail invalide!");
return(false);
}
if (!reponse)
{
alert("Pseudo invalide!");
return(false);
}
if (!reponse2)
{
alert("Adresse mail invalide!");
return(false);
}
return(true);
}
</script>
<form action="maileur.php" method="post" onsubmit="return(check(this));">
PSEUDO :
<input name="PSEUDO" type="text" id="PSEUDO" maxlength="15">
<br>
MAIL :
<input name="MAIL" type="text" id="MAIL" maxlength="250">
<br>
<input type="submit">
</form>