Vérification de remplissage du formulaire
wida
-
Melooo Messages postés 1476 Statut Membre -
Melooo Messages postés 1476 Statut Membre -
Bonjour,
svp corrigez ce code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
<script type="text/javascript">
function verif_champ(id)
{
if (id == "")
{ alert("Le champ id n'est pas remplie");
return false;
}
return true;
}
</script>
<script type="text/javascript">
function verif_champ(nom)
{
if (nom == "")
{ alert("Le champ nom n'est pas remplie");
return false;
}
return true;
}
</script>
<script type="text/javascript">
function verif_champ(prenom)
{
if (prenom == "")
{ alert("Le champ prénom n'est pas remplie");
return false;
}
return true;
}
</script>
</head>
<body>
<form name='form1' onsubmit='returnverif_champ(document.form1.id.value);'action="inscription.php" method="post">
<form name='form1' onsubmit='returnverif_champ(document.form1.nom.value);'action="inscription.php" method="post">
<form name='form1' onsubmit='returnverif_champ(document.form1.prenom.value);'action="inscription.php" method="post">
<p>
<label for="pseudo">ID</label> :<input type="text" name="id" id="id" size="20"/><br />
<label for="name">Nom</label> :<input type="text" name="nom" id="nom" size="20"/><br />
<label for="prenom">Prenom</label> :<input type="text" name="prenom" id="prenom" size="20"/><br/>
<input type="submit" value="Valider"/>
</p>
</form>
</body>
</html>
svp corrigez ce code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
<script type="text/javascript">
function verif_champ(id)
{
if (id == "")
{ alert("Le champ id n'est pas remplie");
return false;
}
return true;
}
</script>
<script type="text/javascript">
function verif_champ(nom)
{
if (nom == "")
{ alert("Le champ nom n'est pas remplie");
return false;
}
return true;
}
</script>
<script type="text/javascript">
function verif_champ(prenom)
{
if (prenom == "")
{ alert("Le champ prénom n'est pas remplie");
return false;
}
return true;
}
</script>
</head>
<body>
<form name='form1' onsubmit='returnverif_champ(document.form1.id.value);'action="inscription.php" method="post">
<form name='form1' onsubmit='returnverif_champ(document.form1.nom.value);'action="inscription.php" method="post">
<form name='form1' onsubmit='returnverif_champ(document.form1.prenom.value);'action="inscription.php" method="post">
<p>
<label for="pseudo">ID</label> :<input type="text" name="id" id="id" size="20"/><br />
<label for="name">Nom</label> :<input type="text" name="nom" id="nom" size="20"/><br />
<label for="prenom">Prenom</label> :<input type="text" name="prenom" id="prenom" size="20"/><br/>
<input type="submit" value="Valider"/>
</p>
</form>
</body>
</html>
A voir également:
- Vérification de remplissage du formulaire
- Whatsapp formulaire opposition - Guide
- Formulaire de réclamation facebook compte désactivé - Guide
- Formulaire de reclamation instagram - Guide
- Confirmer le nouvel envoi du formulaire err_cache_miss ✓ - Forum Access
- Verification windows 11 - Guide