This commit is contained in:
Philippe Torrel
2026-10-02 09:50:52 +02:00
parent 4dec8a5680
commit 5a688bc7ea
8 changed files with 66 additions and 9 deletions
+19 -1
View File
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
@@ -95,11 +95,29 @@
'use strict';
(() => {
// alle li-Elemente findet.
const listItems = document.querySelectorAll('li');
// alle h2-Elemente findet.
const levelTwoHeadings = document.querySelectorAll('h2');
// alle Elemente mit der Klasse special findet.
const specialElements = document.querySelectorAll('.special');
// alle li-Elemente mit der Klasse keyword findet.
const keywordListItems = document.querySelectorAll('li.keyword');
// alle span-Elemente mit der Klasse special findet.
const specialSpans = document.querySelectorAll('span.special');
// alle Elemente findet, die die Klassen i UND b haben.
const italicBoldElements = document.querySelectorAll('.i.b');
console.log('List items:', listItems);
console.log('Level two headings:', levelTwoHeadings);
console.log('Special elements:', specialElements);
console.log('Keyword list items:', keywordListItems);
console.log('Special spans:', specialSpans);
console.log('Italic and bold elements:', italicBoldElements);
})();
</script>
</body>