Sascha Schulz
2023-02-14 7120d95504ee02a9ad5b98f0982b82ebfb9897a2
add parent.appendChild() example
1 Dateien geändert
5 ■■■■ Geänderte Dateien
index.html 5 ●●●● Patch | Ansicht | Raw | Blame | Historie
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>