27 lines
621 B
JavaScript
27 lines
621 B
JavaScript
document.addEventListener("click",firstClick)
|
|
|
|
|
|
function firstClick(){
|
|
let position_button=document.getElementById("div_button")
|
|
let position_score=document.getElementById("div_score")
|
|
|
|
const score_aff = document.createElement("output")
|
|
score_aff.innerText="SCORE"
|
|
score_aff.id = "score_affichage"
|
|
|
|
const click = document.createElement("button")
|
|
click.innerText="click"
|
|
|
|
position_score.appendChild(score_aff)
|
|
position_button.appendChild(click)
|
|
|
|
click.addEventListener("click",scoreCount)
|
|
|
|
|
|
document.removeEventListener("click",firstClick)
|
|
|
|
augmenterScorePassivement()
|
|
|
|
}
|
|
|
|
|