Conditions d’achèvement
4.17: Correction
formulaire.html
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8"/>
<title>Texte</title>
<style>
.erreur{
color: red;
transition: opacity .3s;
}
</style>
</head>
<body>
<h1>Vos identifiants:</h1>
<form method="POST">
<p>
<label>Nom : <input id="nom" type="text"/></label>
<span class="erreur" id="erreur-nom">Non valide !</span>
</p>
<p>
<label>Login : <input id="login" type="text"/></label>
</p>
<p>
<label>Mot de passe : <input id="mdp" type="password"/></label>
<span class="erreur" id="erreur-mdp">Trop court !</span>
</p>
<p>
<label>Confirmation : <input id="confirmation" type="password"/></label>
<span class="erreur" id="erreur-confirmation">Différents !</span>
</p>
<p>
<input id="submit" type="submit" value="Envoyer"/>
</p>
</form>
<script src="formulaire.js"></script>
</body>
</html>