CSY1018-assignment-2/scripts/launch.js

14 lines
392 B
JavaScript
Raw Normal View History

2022-04-28 15:49:09 +00:00
/*Add events to webpage*/
function loadScripts() {
document.addEventListener("keydown", move)
document.addEventListener("keyup", stop)
document.getElementById("start").addEventListener("click", startGame)
}
function startGame() {
var button = document.getElementById("start");
button.style.display = "none";
}
document.addEventListener("DOMContentLoaded", loadScripts);