Compare commits
3 commits
53c09b221a
...
c529b88e94
Author | SHA1 | Date | |
---|---|---|---|
c529b88e94 | |||
30fdc04c98 | |||
03d099a74f |
3 changed files with 42 additions and 1 deletions
|
@ -61,6 +61,11 @@ article
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.BoiteNb
|
||||||
|
{
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
footer
|
footer
|
||||||
{
|
{
|
||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="JustePrix.css" type="text/css">
|
<link rel="stylesheet" href="JustePrix.css" type="text/css">
|
||||||
|
<script src="JustePrix.js"></script>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>JustePrix</title>
|
<title>JustePrix</title>
|
||||||
|
@ -23,9 +24,10 @@
|
||||||
<p class="Titre"><strong>Le Juste Prix</strong></p>
|
<p class="Titre"><strong>Le Juste Prix</strong></p>
|
||||||
<img src="Lagaf.jpg" class="Lagaf">
|
<img src="Lagaf.jpg" class="Lagaf">
|
||||||
<p>Bonjour mon ami et Bienvenue dans le JUSTE PRIX </p>
|
<p>Bonjour mon ami et Bienvenue dans le JUSTE PRIX </p>
|
||||||
<div id="BoiteNb">
|
<div id="BoiteNb" class="BoiteNb">
|
||||||
<label for="Inp_Valeur"> Veuillez rentrer votre nombre</label>
|
<label for="Inp_Valeur"> Veuillez rentrer votre nombre</label>
|
||||||
<input type="text" id="Inp_Valeur">
|
<input type="text" id="Inp_Valeur">
|
||||||
|
<button name="btntent" id="btntent">Verification</button>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer>© Copyright 2019 by ME. All Rights Reserved.</footer>
|
<footer>© Copyright 2019 by ME. All Rights Reserved.</footer>
|
||||||
|
|
34
JustePrix.js
34
JustePrix.js
|
@ -0,0 +1,34 @@
|
||||||
|
let NbJoueur= document.getElementById("Inp_Valeur");
|
||||||
|
let Nb_a_Trouver = 5;
|
||||||
|
|
||||||
|
let btnver = document.getElementById("btntent");
|
||||||
|
|
||||||
|
btnver.addEventListener("click",Verif)
|
||||||
|
|
||||||
|
function Verif()
|
||||||
|
{
|
||||||
|
const NbJoueur2 = parseFloat(NbJoueur); //Verifie qu'il s'agit dun nombre
|
||||||
|
if(NbJoueur2 == isNaN(NbJoueur))
|
||||||
|
{
|
||||||
|
alert("La Valeur rentre est errone");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert("La valeur est bonne");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Trouver(NbJoueur)
|
||||||
|
{
|
||||||
|
if(Nb_a_Trouver == NbJoueur)
|
||||||
|
{
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue