From 6b4fe7473a4d8e1fa291703b58a1c323dce6d3d6 Mon Sep 17 00:00:00 2001 From: HRojotiana Date: Mon, 1 May 2023 23:22:44 +0200 Subject: [PATCH] to pull --- incrementation.js | 11 +++++++++++ index.html | 18 ++++++++++++++++++ style.css | 17 +++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 incrementation.js create mode 100644 index.html create mode 100644 style.css 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; +} +