From d1bd2c6b8dd2432d10e192f4b644c686cf26fcc3 Mon Sep 17 00:00:00 2001 From: Sascha Schulz <sschulz@dh-software.de> Date: Di, 14 Feb 2023 17:45:12 +0100 Subject: [PATCH] merge draft --- index.html | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/index.html b/index.html index 504d73e..4713b32 100644 --- a/index.html +++ b/index.html @@ -529,7 +529,7 @@ <pre> <code class="js" data-trim data-line-numbers> // findet das erste Element - const element = document.querySelector("#id"); + const parent = document.querySelector("#id"); // findet alle Elemente const elements = document.querySelectorAll("#id"); @@ -541,6 +541,9 @@ // Click-Event }); + // Element anhängen + parent.appendChild(newElement); + newElement.remove(); </code> </pre> -- Gitblit v1.9.3