Matching game using javascript -
i making game logic of game match word given uses image.
how validate using image?
< script > var e = document.getelementbyid("e"); var n = document.getelementbyid("n"); var d = document.getelementbyid("d"); /*move img_letter*/ //e function move_e() { e.onclick = function() { e.style.bottom = "300px" e.style.left = "320px" } }; //n function move_n() { n.onclick = function() { n.style.bottom = "300px" n.style.left = "550px" } }; //d function move_d() { d.onclick = function() { d.style.bottom = "300px" d.style.left = "780px" } }; window.onload = function() { move_e(); move_n(); move_d(); } < /script>
<html> <head> </head> <style> #d { margin-left: -3%; position: absolute; } #n { margin-left: 5%; position: absolute; } #e { margin-left: 13%; position: absolute; } .img_letter { margin-top: 25%; margin-left: 40%; } </style> <body> <h1 align="center">end</h1> <div class="img_letter"> <div id="n"> <img src="http://i62.tinypic.com/2rx8qjb_th.png" width="100px" height="100px"> </div> <div id="e"> <img src="http://i61.tinypic.com/2qny5xx_th.png" width="100px" height="100px"> </div> <div id="d"> <img src="http://i57.tinypic.com/2554dfk_th.png" width="100px" height="100px"> </div> </div> </body> </html>
Comments
Post a Comment