Merge branch 'main' of https://git.etud.insa-toulouse.fr/mougnibas/projet-clicodrome
This commit is contained in:
commit
ea464e791a
1 changed files with 3 additions and 6 deletions
|
@ -1,13 +1,10 @@
|
|||
|
||||
let firstclick = 0
|
||||
document.addEventListener("click",firstClick)
|
||||
|
||||
if (firstclick==0){
|
||||
document.addEventListener("click",button)
|
||||
firstclick = 1
|
||||
}
|
||||
|
||||
function button(){
|
||||
function firstClick(){
|
||||
const click = document.createElement("button")
|
||||
click.innerText="click"
|
||||
document.body.appendChild(click)
|
||||
document.removeEventListener("click",button)
|
||||
}
|
Loading…
Reference in a new issue