JS Beispiel getElementsByClassName
How do I make an js beispiel getelementsbyclassname?
What is a js beispiel getelementsbyclassname? How do you make a js beispiel getelementsbyclassname? This script and codes were developed by Anna Prenzel on 04 September 2022, Sunday.
JS Beispiel getElementsByClassName - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>JS Beispiel getElementsByClassName</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <button onclick="color()">Markiere jede zweite h4-Überschrift</button>
<button onclick="undo()">Rückgängig</button>
<h1>Hochschule Zittau/Görlitz</h1>
<div id="container"> <h4>Mit ERASMUS an die Wurzeln der Mikrobiologie</h4> <p>Studentin der Molekularen Biotechnologie absolviert Praxissemester und Bachelorarbeit am ‚Institut Pasteur‘ in Paris.</p> <h4 class="red">Fruchtbare Zusammenarbeit wird fortgesetzt</h4> <p> Neuer Kooperationsvertrag zwischen Hochschule und Landkreis unterzeichnet.</p> <h4>Gehen wir heute Abend in die Mensa essen?</h4> <p> Das Studentenwerk Dresden untersucht die Option ein Abendangebot in den Mensen zu gestalten.</p> <h4 class="red">Auf den Lehrer mit Herz kommt es an</h4> <p>Am 04.04. fand im Landratsamt Görlitz die Eröffnung der Ausstellung von Schülerarbeiten statt. ZINT war dabei.</p>
</div> <script src="js/index.js"></script>
</body>
</html>
JS Beispiel getElementsByClassName - Script Codes CSS Codes
h4:nth-Child(3){ color: blue;
}
h4:nth-Child(7){ color: blue;
}
JS Beispiel getElementsByClassName - Script Codes JS Codes
function color(){ //Liste mit allen Elementen mit der Klasse "red" var elements = document.getElementsByClassName("red"); //Bearbeite jedes Element in der Liste for(var i=0; i<elements.length; i++){ //Bearbeite das Element an der Position i: elements[i].style.color = "red"; }
}
function undo(){ var elements = document.getElementsByClassName("red"); for(var i=0; i<elements.length; i++){ elements[i].style.color = ""; }
}
Developer | Anna Prenzel |
Username | HSZG-Frontend-Kurs |
Uploaded | September 04, 2022 |
Rating | 3 |
Size | 2,238 Kb |
Views | 20,240 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
CSS Beispiel Menu | 2,010 Kb |
JS Beispiel getElementsByTagName | 1,908 Kb |
JS RadioButtons 2 angularJS | 1,699 Kb |
JS Beispiel innerHTML2 | 1,734 Kb |
JS Beispiel Input Farbe | 1,575 Kb |
JS Beispiel getElementsByClassName | 2,238 Kb |
Form Beispiel 2 | 1,719 Kb |
JS Aufgabe Zitat | 1,498 Kb |
JS Aufgabe Todo | 1,445 Kb |
JS Beispiel getElementsByClassName 3 | 1,988 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
CSS Patterns | Alyda | 3,953 Kb |
AngularJS Skills | Supro | 3,312 Kb |
Pure CSS Menu | Bronsrobin | 3,321 Kb |
NAV WPMANAGER | Mstoic | 1,991 Kb |
Custom Checkbox and radio inputs SCSS | Rgfx | 3,367 Kb |
Css Rotating 3d cubes different speed | Dghez | 2,364 Kb |
Box Shadow Effects | Retrofuturistic | 2,143 Kb |
AngularJS Datalist Directive | M-e-conroy | 2,366 Kb |
Drill-down Map | Good886 | 8,484 Kb |
Monochrome Form | AlienPiglet | 3,096 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!