parent
d0862085f1
commit
0e504b68e8
@ -0,0 +1,51 @@
|
||||
function sdf(){
|
||||
window.alert("lksjdf");
|
||||
}
|
||||
|
||||
|
||||
function creerPartie(){
|
||||
localStorage.setItem("nomJoueur", "J1");
|
||||
}
|
||||
|
||||
function affichage(){
|
||||
document.getElementById("instructions").innerHTML = localStorage.getItem("nomJoueur");
|
||||
if( localStorage.getItem("nomJoueur") == 'J1'){
|
||||
document.getElementById("messages").innerHTML = "Tu joues les croix"
|
||||
}
|
||||
else{
|
||||
document.getElementById("messages").innerHTML = "Tu joues les ronds"
|
||||
window.alert(localStorage.getItem("nomJoueur"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ValidateEmail(entre)
|
||||
{
|
||||
if (entre!="X" ||(entre !="x"))
|
||||
{
|
||||
return (true)
|
||||
}
|
||||
alert("You have entered an invalid email address!")
|
||||
return (false)
|
||||
}
|
||||
|
||||
/*
|
||||
function rejoindrepartie(){
|
||||
localStorage.setItem("nomJoueur", "J2");
|
||||
}
|
||||
|
||||
function Tourdequi(joueur){
|
||||
if(tab j1 + tabj2 .lenght %2==0){
|
||||
return J1;
|
||||
}
|
||||
|
||||
return J2;
|
||||
}
|
||||
|
||||
function finirpartie(){
|
||||
localStorage.removeItem("nomJoueur");
|
||||
}
|
||||
|
||||
localStorage.setItem("lastname", "Smith");
|
||||
// Retrieve
|
||||
document.getElementById("result").innerHTML = localStorage.getItem("lastname"); */
|
Binary file not shown.
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="fr">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Morpion</title>
|
||||
<link rel="stylesheet" href="css.css">
|
||||
<script type="text/javascript" src="js.js"></script>
|
||||
</head>
|
||||
<body onload="sdf()">
|
||||
<h1><button onclick="creerPartie()">Créer partie</button></h1>
|
||||
<h1><input type="b" name="sdf" placeholder="Mettre id de la partie"><button>Rejoindre</button></h1>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="fr">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>Morpion p2</title>
|
||||
<link rel="stylesheet" href="css.css">
|
||||
<script type="text/javascript" src="js.js"></script>
|
||||
</head>
|
||||
|
||||
<body onload="affichage()">
|
||||
<header>
|
||||
<h1>Morpion</h1>
|
||||
</header>
|
||||
<div class="messages" id="messages">
|
||||
<h2></h2>
|
||||
</div>
|
||||
<div class="instructions" id="instructions">
|
||||
<p>Click in a box to play</p>
|
||||
</div>
|
||||
<div class="container">
|
||||
|
||||
<input></input required pattern="banane|cerise">
|
||||
<input></input>
|
||||
<input></input>
|
||||
<br>
|
||||
<input></input>
|
||||
<input></input>
|
||||
<input></input>
|
||||
<br>
|
||||
<input></input>
|
||||
<input></input>
|
||||
<input></input>
|
||||
</div>
|
||||
<button onclick="verifier(document.getElementById("in").value)">Valider</button>
|
||||
|
||||
|
||||
<br> <button class="reset">Rénisitalisation</button>
|
||||
</body>
|
||||
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
|
Loading…
Reference in new issue