Exercise 10.6
This commit is contained in:
parent
160ec29c74
commit
54a63ec9f1
22
Chapter 10/Exercise 10.6
Normal file
22
Chapter 10/Exercise 10.6
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>JS Tester</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<div class="myEle">One</div>
|
||||||
|
<div class="myEle">Two</div>
|
||||||
|
<div class="myEle">Three</div>
|
||||||
|
<div class="myEle">Four</div>
|
||||||
|
<div class="myEle">Five</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
const eles = document.querySelectorAll(".myEle");
|
||||||
|
console.log(eles);
|
||||||
|
eles.forEach((el) => {
|
||||||
|
console.log(el);
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user