//----------Use the previous mouse tail star to complete the maze game, players need to continue to move to find the exit, but the body can not touch the wall, otherwise the game failed
----unfinished------did not complete the whole game, only to do the basic game mechanism, feel nothing interesting, and so when there is a good idea, then finish it
1<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">234<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>5<title>easyMaze</title>67<style type= "Text/css" >8 div{width:5px;height:5px;position:absolute;background:red;left:100px;top:100px;}9</style>Ten<script type= "Text/javascript" > OneWindow.onload=function(){ A for(i=0;i<8;i++) document.body.innerhtml+=Document.body.innerHTML; -Odiv=document.getelementsbytagname (' div '); - for(i=31;i<odiv.length;i++){ the if(i%2) odiv[i].style.top=odiv[i].offsettop+60+ ' px '; -Odiv[i].style.left=odiv[i].offsetleft+math.ceil (I/2) *5+ ' px '; -Odiv[i].onmouseover=function() {alert (' Game over. '));}; - } +Document.onmousemove=function(EV) { -oevent=ev| |event; + for(i=0;i<31;i++){ Aodiv[i].style.left=odiv[i+1].offsetleft+ ' px '; atodiv[i].style.top=odiv[i+1].offsettop+ ' px '; - } -odiv[30].style.left=oevent.clientx+ ' px '; -odiv[30].style.top=oevent.clienty+ ' px '; - } - } in</script> -<body> to<div></div> +</body> -Day8--------Easymaze