Browse Source

avance du js

master
saulnier.j 3 years ago
parent
commit
00ce702ac8
  1. 7
      Index.html
  2. 18
      main.js
  3. 23
      test.html

7
Index.html

@ -12,7 +12,7 @@
</head> </head>
<body> <body>
<img src="logo.jpeg" <img src="logo.jpeg">
<div class="loader"> <div class="loader">
@ -21,13 +21,8 @@
<span class="lettre">7</span> <span class="lettre">7</span>
<span class="lettre">7</span> <span class="lettre">7</span>
</div> </div>
<input type="text" id="input" name="input" value=""><br>
<input type="button" id="bouton" value="Contrôler" onclick="controle()">
<script src="loading.js"></script> <script src="loading.js"></script>
<script src="main.js"></script> <script src="main.js"></script>

18
main.js

@ -1,19 +1,19 @@
let machine_sous = new Object(); //let machine_sous = new Object();
//machine_sous.argent = int(input("Saississez votre somme de départ: ")) let argent = ""
machine_sous.nombres = [] let nombres = []
machine_sous.bank = 1000 let bank = 1000
machine_sous.mise = -1 let mise = -1
machine_sous.gains = 0 let gains = 0
function controle(){ function controle(){
var saisie = document.getElementById("input").value; argent = document.getElementById("input").value;
alert("Vous avez saisi : "+ saisie); test(15);
} }
function test(taille){ function test(taille){
for(let i=0; i<taille; i++){ for(let i=0; i<taille; i++){
console.log(i) console.log(i)
} }
console.log(argent)
} }
test(15);

23
test.html

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<img src="logo.jpeg">
<input type="text" id="input" name="input" value=""><br>
<input type="button" id="bouton" value="Contrôler" onclick="controle()">
<script src="main.js"></script>
</body>
</html>
Loading…
Cancel
Save