Created
April 16, 2014 18:09
-
-
Save Blacksly/10915222 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<link rel="stylesheet" href="style.css"/> | |
<title>Accueil</title> | |
</head> | |
<body> | |
<header> | |
<h1>Bienvenue sur le serveur de Blacksly !</h1> | |
</header> | |
<aside> | |
<form id="formulaire2" method="post" action="" > | |
<p> Nom <input type="text" name="nom" id="nom" size="20" maxlength="30"/> </p> | |
<p> Mot de passe : <br/> <input type="password" id="mdp" name="mdp" size="8" maxlength="8"/> </p> | |
<input type="button" value="OK" onclick="fonction()" /> | |
</form> | |
</aside> | |
<script> | |
function fonction() | |
{ | |
if(document.getElementById('nom').value=="" || document.getElementById('mdp').value=="") | |
{ | |
alert("1 ou plusieurs champs non renseigne"); | |
} | |
else | |
{ | |
document.getElementById('formulaire2').submit(); | |
} | |
} | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment