-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path09-dom.html
42 lines (25 loc) · 849 Bytes
/
09-dom.html
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
41
42
<!DOCTYPE html>
<html>
<head>
<title>DOM</title>
</head>
<body>
<button>Hello</button>
<button class="js-button">New button</button>
<script>
console.log(document.querySelector('button').innerHTML);
document.querySelector('button')
.innerHTML = 'Alex';
const buttonElement = document.querySelector('.js-button');
console.log(buttonElement);
console.log(document.title);
document.title = "DOM" ;
console.log(document.body);
console.log(typeof document.body);
console.log(document.body.innerHTML)
document.body.innerHTML = '<button>Great job</button>'
document.body.innerHTML = 'hello';
document.title = 'Good job'
</script>
</body>
</html>