Skip to content

Commit e24fcef

Browse files
committed
added dom markups
1 parent 5e136a2 commit e24fcef

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

dom/index.html

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8+
<title>Js Code Snippets</title>
9+
</head>
10+
11+
<body>
12+
13+
<h1 id="head">Js Code Snippets</h1>
14+
<h1 class="head2">Js Code Snippets</h1>
15+
<h1 name="head3">Js Code Snippets</h1>
16+
17+
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
18+
<script src="index.js"></script>
19+
</body>
20+
21+
</html>

dom/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
document.getElementById('head').style.color="red";
2+
document.getElementsByClassName('head2')[0].style.color="green";
3+
document.getElementsByTagName('head3')[0].style.color="blue";

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<body>
1212

13-
<h1 id="head">Js Code Snippets</h1>
13+
<h1>Js Code Snippets</h1>
1414

1515
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
1616
<script src="index.js"></script>

0 commit comments

Comments
 (0)