CHASSAGNOL Bruno
3 years ago
1 changed files with 33 additions and 28 deletions
@ -1,28 +1,33 @@ |
|||||
<!DOCTYPE html> |
<!DOCTYPE html> |
||||
<html> |
<html> |
||||
<body> |
<body> |
||||
<script> |
<input type="text" id="name" required |
||||
var jeton_jac=1000; |
minlength="4" maxlength="8" size="10"> |
||||
var jeton_joueur=100; |
<button onclick="lancement()">lance le jeu</button> |
||||
function myFunction() { |
<script> |
||||
var x = document.getElementById("name").value; |
var jeton_bac=1000; |
||||
document.write(x);} |
var jeton_joueur=99; |
||||
function nbAlea(){ |
function lancement() { |
||||
const cars = [Math.floor(Math.random() * 10) , |
var nb_jet = document.getElementById("name").value; |
||||
Math.floor(Math.random() * 10) , |
if (jeton_joueur > nb_jet && jeton_bac > 500 && nb_jet < 100 && nb_jet> 0){document.write(11);} |
||||
Math.floor(Math.random() * 10) ]; |
else{document.write("tu as mis trop de jetons");} |
||||
document.write(cars); |
|
||||
} |
} |
||||
nbAlea() |
</script> |
||||
|
<script> |
||||
</script> |
function nbAlea(){ |
||||
<button onclick="myFunction()">Validé</button> |
const cars = [Math.floor(Math.random() * 10) , |
||||
<input type="text" id="name" required |
Math.floor(Math.random() * 10) , |
||||
minlength="4" maxlength="8" size="10"> |
Math.floor(Math.random() * 10) ]; |
||||
</body> |
document.write(cars); |
||||
</html> |
} |
||||
|
nbAlea(); |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
Loading…
Reference in new issue