From 9747f5bfd1f5690a027386316c24708217411783 Mon Sep 17 00:00:00 2001 From: RochoElLocho Date: Thu, 26 Sep 2024 21:33:02 +0200 Subject: [PATCH] =?UTF-8?q?Neue=20Schaltfl=C3=A4che=20hinzugef=C3=BCgt=20D?= =?UTF-8?q?ie=20neue=20Schaltfl=C3=A4che=20l=C3=B6scht=20das=20Formular=20?= =?UTF-8?q?(alle=20Checkboxen=20und=20das=20Textfeld=20f=C3=BCr=20den=20Su?= =?UTF-8?q?chbegriff)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index a88bff4..40d6257 100644 --- a/index.html +++ b/index.html @@ -65,6 +65,21 @@ background-color: #2980b9; } + #resetButton { + padding: 0.75rem 2rem; + font-size: 1rem; + background-color: #3498db; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; + } + + #resetButton:hover { + background-color: #2980b9; + } + .checkbox-section { display: flex; flex-wrap: wrap; @@ -178,9 +193,12 @@
- - +
+ + +
+
@@ -443,11 +461,6 @@
- - - - -
@@ -492,6 +505,16 @@ subCheckboxes.forEach(checkbox => { checkbox.checked = masterCheckbox.checked; }); + } + + function resetForm() { + document.getElementById('query').value = ''; // Textfeld zurücksetzen + + // Alle Checkboxen zurücksetzen + const checkboxes = document.querySelectorAll('.checkbox-container input[type="checkbox"]'); + checkboxes.forEach((checkbox) => { + checkbox.checked = false; // Alle Checkboxen auf unchecked setzen + }); }