-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
242 lines (213 loc) · 6.52 KB
/
index.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DOM</title>
<style>
/* .colors {
color: white;
background: red;
padding: 0.35rem 0.75rem;
width: 16rem;
}
.text {
text-transform: uppercase;
} */
.black {
color: #333;
font-weight: bold;
}
.red {
colors: white;
background: red;
}
.blue {
colors: blue;
background: blue;
}
.text {
font-size: 1.25rem;
text-transform: uppercase;
}
/* a {
display: inline-block;
margin-top: 100vh;
} */
.btn {
display: block;
color: white;
background: red;
padding: 15px;
text-transform: uppercase;
font-size: 1.5rem;
margin: 10px;
}
</style>
</head>
<body>
<!-- getElementById for id
<div id="container">
<h2 id="title">Hello World</h2>
</div> -->
<!-- getElementByTagName
<div id="container">
<h2 id="title">Hello World</h2>
<ul>
<li>one piece</li>
<li>naruto</li>
<li>shaman King</li>
</ul>
</div> -->
<!-- getElementByClassName for className
<div class="container">
<h2>hello there</h2>
<ul class="list-item">
<li>one piece</li>
<li>naruto</li>
<li>shinchan</li>
</ul>
</div> -->
<!-- querySelector & querySelectorAll
<h2>SHP Pirates</h2>
<ul id="shp">
<li id="members">lutfy</li>
<li id="members">zoro</li>
<li id="members">sanji</li>
<li id="members">ussop</li>
</ul> -->
<!-- children
<h2>SHP Pirates</h2>
<ul id="shp">
<li id="members">lutfy</li>
<li id="members">zoro</li>
<li id="members">sanji</li>
<li id="members">ussop</li>
</ul> -->
<!-- parentElement
<div class="container">
<h2>SHP Pirates</h2>
<ul id="shp">
<li class="members">lutfy</li>
<li class="members">zoro</li>
<li class="members">sanji</li>
<li class="members">ussop</li>
</ul>
</div> -->
<!-- nextSibling & previousSibling
<div class="container">
<h3>sub title</h3>
<h2>main title</h2>
</div> -->
<!-- nextElementSibling & previousElementSibling
<h2>The Pirates</h2>
<ul id="list-item">
<li class="lutfy">shp</li>
<li>rhp</li>
<li>marine ford</li>
</ul> -->
<!-- textContent and childNodes
<h3>Hello people</h3>
<h2>Hello World</h2> -->
<!-- getAttribute, setAttribute
<div class="container">
<h2 class="title" id="titles">Hello World</h2>
<a href="index.html" class="links">This Links</a>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam,
doloribus!
</p>
</div> -->
<!-- className & classList
<h2 class="first">first element</h2>
<h2 class="second">second element</h2>
<h2 class="third">third element</h2> -->
<!-- createElement, createTextNode , appendChild, insertBefore
<div class="container">
<h2 class="shp">The Pirates of SHP</h2>
</div> -->
<!-- innerText prepend
<div class="container">
<h2 class="shp">The Pirates of SHP</h2>
</div> -->
<!-- remove , removeChild
<h2>Hello World</h2>
<div class="container">
<h2>On container</h2>
</div> -->
<!-- innerHTML & textContent
<div class="container">
<h1>Hello World</h1>
</div> -->
<!-- addEventListener, function reference
<div class="container">
<h3>The Pirates</h3>
<button class="btn">Join</button>
</div> -->
<!-- key events
<input type="text" class="inputName" /> -->
<!-- even object
<button class="btn">click me</button>
<h1>some heading</h1>
<a href="#" id="link">random link</a> -->
<!-- currentTarget vs target
<button class="btn">
first button
<h3>the heading</h3>
</button>
<button class="btn">
second <strong>button <strong>more nested</strong></strong>
</button>
<button class="btn">
third button
<p>lorem10</p>
</button> -->
<!-- event propogation_bubbling_capturing
<div class="container">
<ul class="list-items">
<li class="item"><a href="#" class="link">link</a></li>
<li class="item"><a href="#" class="link">link</a></li>
<li class="item"><a href="#" class="link">link</a></li>
</ul>
</div> -->
<!-- example
<div class="container">
</div>
<button class="btn">clicked</button> -->
<!-- forms event submit -->
<!-- <form action="" id="form">
<input type="text" id="name" />
<input type="password" id="password" />
<input type="submit" value="submit"></input>
</form> -->
<!-- localStorage -->
<h1>Local Storage</h1>
<!-- source js -->
<!-- <script src="/01_getElementById.js"></script> -->
<!-- <script src="/02_getElementByTagName.js"></script> -->
<!-- <script src="/03_getElementByClassName.js"></script> -->
<!-- <script src="/04_querySelector.js"></script> -->
<!-- <script src="/05_children.js"></script> -->
<!-- <script src="/06_parentElement.js"></script> -->
<!-- <script src="/07_nextSibling_previous.js"></script> -->
<!-- <script src="/08_nextElementSibling_previous.js"></script> -->
<!-- <script src="/09_textContent.js"></script> -->
<!-- <script src="/10_getAttribute.js"></script> -->
<!-- <script src="/11_className-classList.js"></script> -->
<!-- <script src="/12_createElement_textnode_appendChild.js"></script> -->
<!-- <script src="/13_insertBefore.js"></script> -->
<!-- <script src="/14_innerText_prepend.js"></script> -->
<!-- <script src="/15_remove_removeChild.js"></script> -->
<!-- <script src="/16_innerHTML_textContent.js"></script> -->
<!-- <script src="/17.addEventListener.js"></script> -->
<!-- <script src="/18_function_reference.js"></script> -->
<!-- <script src="/19_key_events.js"></script> -->
<!-- <script src="/20_event_object.js"></script> -->
<!-- <script src="/21_currentTarget_target.js"></script> -->
<!-- <script src="/22_propogation_bubbling_capturing.js"></script> -->
<!-- <script src="/23_example.js"></script> -->
<!-- <script src="/24_forms_event_submit.js"></script> -->
<!-- <script src="/25_local_storage.js"></script> -->
<script src="/26_with_multiple_value.js"></script>
</body>
</html>