Created
December 13, 2012 19:20
-
-
Save valeriu/4278968 to your computer and use it in GitHub Desktop.
Exercice 07-3 b
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> | |
<title>Exercice 07-3 b</title> | |
</head> | |
<body> | |
<script language="JavaScript" type="text/JavaScript"> | |
const CODE = "secret01"; | |
const PASSE = "pizza"; | |
var codeUtilisateur = window.prompt("Code utilisateur", ""); | |
var motPasse = window.prompt("Mot de passe", ""); | |
switch(codeUtilisateur) | |
{ | |
case CODE: | |
switch(motPasse) | |
{ | |
case PASSE : | |
window.alert("Vous avez acces au reseau"); | |
break; | |
case "" : | |
window.alert("Vous devez specifier le code utilisateur et le mot de passe"); | |
break; | |
default : | |
window.alert("Mot de passe incorect"); | |
break; | |
} | |
break; | |
case "" : | |
window.alert("Vous devez specifier le code utilisateur et le mot de passe"); | |
break; | |
default : | |
window.alert("Utilisateur inconnu"); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment