BERDUGO Simon
3 years ago
1 changed files with 18 additions and 20 deletions
@ -1,21 +1,19 @@ |
|||||
<!DOCTYPE html> |
<!DOCTYPE html> |
||||
<html> |
<html> |
||||
<body> |
<body> |
||||
<input type="text" id="name" required |
<input type="text" id="name" required |
||||
minlength="4" maxlength="8" size="10"> |
minlength="4" maxlength="8" size="10"> |
||||
<button onclick="lancement()">lance le jeu</button> |
<button onclick="lancement()">lance le jeu</button> |
||||
<script> |
<script> |
||||
var jeton_bac=1000; |
var jeton_bac=1000; |
||||
var jeton_joueur=99; |
var jeton_joueur=99; |
||||
function lancement() { |
function lancement() { |
||||
var jeton_bac=1000; |
var nb_jet = document.getElementById("name").value; |
||||
var jeton_joueur=99; |
if (jeton_joueur > nb_jet && jeton_bac > 500 && nb_jet < 100 && nb_jet> 0){document.write(11);} |
||||
var nb_jet = document.getElementById("name").value; |
else{document.write("tu as mis trop de jetons");} |
||||
if (jeton_joueur > nb_jet && jeton_bac > 500 && nb_jet < 100 && nb_jet> 0){document.write(11);} |
|
||||
else{document.write("tu as mis trop de jetons");} |
} |
||||
|
</script> |
||||
} |
|
||||
</script> |
</body> |
||||
|
|
||||
</body> |
|
||||
</html> |
</html> |
Loading…
Reference in new issue