Skip to content
Snippets Groups Projects
Commit 2f01457e authored by Sarah Fiedler's avatar Sarah Fiedler
Browse files

add EventListener

parent 1b3f9f96
Branches
No related tags found
No related merge requests found
...@@ -9,6 +9,10 @@ const roundResultsMessage = document.getElementById("results-msg") ...@@ -9,6 +9,10 @@ const roundResultsMessage = document.getElementById("results-msg")
const buttonStein = document.getElementById("rock-btn") const buttonStein = document.getElementById("rock-btn")
const buttonPapier = document.getElementById("paper-btn") const buttonPapier = document.getElementById("paper-btn")
const buttonSchere = document.getElementById("scissors-btn") const buttonSchere = document.getElementById("scissors-btn")
buttonStein.addEventListener("click", showResults("Stein"));
buttonPapier.addEventListener("click", showResults("Papier"));
buttonSchere.addEventListener("click", showResults("Schere"));
function getRandomComputerResult(){ function getRandomComputerResult(){
const number = Math.floor(Math.random()*options.length); const number = Math.floor(Math.random()*options.length);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment