diff --git a/incrementation.js b/incrementation.js new file mode 100644 index 0000000..44c3db2 --- /dev/null +++ b/incrementation.js @@ -0,0 +1,11 @@ +let incrementBtn = document.getElementById('incrementBtn'); +let count = document.getElementById('count'); + +let counter = 0; + +incrementBtn,addEventListener('click', () => { + counter++; + count.innerText = counter; + +}); + diff --git a/index.html b/index.html new file mode 100644 index 0000000..dc386fb --- /dev/null +++ b/index.html @@ -0,0 +1,18 @@ + + + + + + + + Incremental bouton + + +
+

Count: 0

+ + +
+ + + \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..ddf9091 --- /dev/null +++ b/style.css @@ -0,0 +1,17 @@ +*{ + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body{ + display: flex; + flex-direction: column; + align-items: center; + padding-top: 20rem; +} + +button{ + cursor: pointer; +} +