
一款简单好玩的HTML5激流勇进迷宫逃生小游戏源码。游戏玩法:使用左键、右键和上箭头键移动。
js代码
<script src=\"game.js\"></script>
<script>
window.onload = function () {
var height = document.documentElement.clientHeight;
var kbBox = document.getElementById(\"kbBox\");
var top = height - 400;
console.log(top);
kbBox.setAttribute(\"style\",\"height:\"+top/2+\"px\");
var startGameId = document.getElementById(\"startGame\");
var enterGameId = document.getElementById(\"enterGame\");
var gameId = document.getElementById(\"gameId\");
enterGameId.onclick = function () {
gameId.setAttribute(\"style\",\"display:block\");
startGameId.setAttribute(\"style\",\"display:none\");
Loop();
}
}
</script>










暂无评论内容