probleme d'apparition
This commit is contained in:
parent
5585d81417
commit
4d401ae98e
2 changed files with 25 additions and 0 deletions
12
index.html
12
index.html
|
@ -0,0 +1,12 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Prog Web Legend</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Ecris une ligne</p>
|
||||||
|
<script src="./js/intro.js" deref></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
js/intro.js
13
js/intro.js
|
@ -0,0 +1,13 @@
|
||||||
|
|
||||||
|
let firstclick = 0
|
||||||
|
|
||||||
|
if (firstclick==0){
|
||||||
|
document.addEventListener("click",button)
|
||||||
|
firstclick = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function button(){
|
||||||
|
const click = document.createElement("button")
|
||||||
|
click.innerText="click"
|
||||||
|
document.body.appendChild(click)
|
||||||
|
}
|
Loading…
Reference in a new issue