From f51be40a1c4ac76aaf7bd40e4d252fa11403fe97 Mon Sep 17 00:00:00 2001 From: beau Date: Fri, 29 Nov 2024 08:53:49 +0100 Subject: [PATCH] score --- js/intro.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/js/intro.js b/js/intro.js index 06fc30a..02131cd 100644 --- a/js/intro.js +++ b/js/intro.js @@ -5,15 +5,25 @@ document.addEventListener("click",firstClick) function firstClick(){ let position_button=document.getElementById("div_button_score") - const click = document.createElement("button") - click.innerText="click" - position_button.appendChild(click) const score_aff = document.createElement("output") score_aff.innerText="SCORE" score_aff.id = "score_affichage" + + + + const saut=document.createElement("div") + + const click = document.createElement("button") + click.innerText="click" + position_button.appendChild(score_aff) + saut.appendChild(click) + position_button.appendChild(saut) + click.addEventListener("click",scoreCount) + + document.removeEventListener("click",firstClick) }