Skip to content

Commit d65dd30

Browse files
[ADD] add Node in DOM
1 parent 5fd2936 commit d65dd30

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

DOM/Node.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Node</title>
6+
</head>
7+
<body>
8+
9+
<div id="div1">good</div>
10+
11+
<script>
12+
let html=document.documentElement;
13+
console.log(html.nodeName);
14+
console.log(html.nodeType);
15+
console.log(html.nodeValue);
16+
17+
let div=document.getElementById("div1");
18+
console.log(div.nodeName);
19+
console.log(div.nodeType);
20+
console.log(div.nodeValue);
21+
22+
</script>
23+
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)