@ -0,0 +1,21 @@
|
|||||||
|
var modes=["points","temps","survie"];
|
||||||
|
var div=document.getElementById('buttons');
|
||||||
|
modes.forEach(element => {
|
||||||
|
var name=element+"Button";
|
||||||
|
|
||||||
|
eval("var "+name+"= new Image()");
|
||||||
|
/*
|
||||||
|
console.log(name+".src='./ress/button_mode_"+element+".png'");
|
||||||
|
eval(name+".src='./ress/button_mode_"+element+".png'");
|
||||||
|
*/
|
||||||
|
console.log("<img src='"+"./ress/button_mode_"+element+".png'"+"/>");
|
||||||
|
|
||||||
|
div.innerHTML+="<img id="+name+" src='./ress/button_mode_"+element+".png'/>";
|
||||||
|
/*
|
||||||
|
eval(name).onload = function(){
|
||||||
|
div.innerHTML+="<img src='./ress/button_mode_"+element+".png'/>";
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//eval(name).src="./ress/button_mode_"+element+".png";
|
||||||
|
eval(name).addEventListener("mousedown",function(e){console.log("yo");});
|
||||||
|
});
|
@ -1,16 +0,0 @@
|
|||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
On the Dot
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<form action="./game.php" method="post">
|
|
||||||
<input type="radio" id="no-res" name="mode" value="no-res">
|
|
||||||
<label for="no-res">Sans réserve</label><br>
|
|
||||||
<div class="button">
|
|
||||||
<button type="submit">JOUER !</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.4 KiB |