-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtut56.html
More file actions
40 lines (34 loc) · 988 Bytes
/
Copy pathtut56.html
File metadata and controls
40 lines (34 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Manipulating DOM </title>
</head>
<body>
<div id="nav" class="container">
<ul>
<li>Home </li>
<li>about</li>
<li>contactus</li>
<li>services</li>
<li>callus</li>
</ul>
</div>
<div class="container">
another container
</div>
<script>
let main = document.getElementById('main')
console.log(main);
let nav = document.getElementById('nav')
console.log(nav);
let container = document.getElementsByClassName('container')
console.log('container');
// let sel = document.querySelector('#nav>li')
// console.log("selector returns", sel );
let sel = document.querySelectorAll('#nav>li')
console.log("selector returns", sel );
</script>
</body>
</html>