Skip to content
Snippets Groups Projects
Commit 58a3cac3 authored by ec875's avatar ec875
Browse files

join game button on create page

parent c95d149c
Branches kaifeng
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@
<h2>Create a new game</h2>
<input id="gameNameInput" placeholder="Game name">
<button id="createBtn">Create Game</button>
<button id="joinGameBtn">Join Game</button>
</div>
<script src="createGame.js"></script>
</body>
......
......@@ -14,7 +14,10 @@ function storeGameName() {
}
gameNameInput.addEventListener("input", storeGameName);
storeGameName();
let joinGameBtn = document.getElementById("joinGameBtn");
joinGameBtn.addEventListener("click", () => {
window.location = "rooms.html";
})
let createBtn = document.getElementById("createBtn");
createBtn.addEventListener("click", () => {
if (gameName == "") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment