|
15 | 15 | </style> |
16 | 16 | </head> |
17 | 17 | <body> |
18 | | - <!-- 1 getElementById() --> |
19 | | - <!-- <div class="container" id="container"> |
20 | | - <h1 id="title">Hello there</h1> |
21 | | - <a href="#" id="btn">example</a> |
22 | | - </div> --> |
23 | | - |
24 | | - <!-- 2 getElementByTagName |
25 | | - <h2>Hello There</h2> |
26 | | - <h2>Hello There-2</h2> |
27 | | - <ul> |
28 | | - <li>lutfy</li> |
29 | | - <li>zoro</li> |
30 | | - <li>sanji</li> |
31 | | - </ul> --> |
32 | | - |
33 | | - <!-- 3 getElementByClassName |
34 | | - <ul> |
35 | | - <li class="special">Lutfi</li> |
36 | | - <li class="special">Zoro</li> |
37 | | - <li class="special">Sanji</li> |
38 | | - </ul> --> |
39 | | - |
40 | | - <!-- 4 querySelector |
41 | | - <ul id="listItem"> |
42 | | - <h2>SHP</h2> |
43 | | - <li class="shp">luffy</li> |
44 | | - <li class="shp">zoro</li> |
45 | | - <li class="shp">sanji</li> |
46 | | - <h2>RHP</h2> |
47 | | - <li class="rhp">shanks</li> |
48 | | - <li class="rhp">benbackman</li> |
49 | | - <li class="rhp">yasop</li> |
50 | | - </ul> --> |
51 | | - |
52 | | - <!-- 5 children |
53 | | - <ul id="result"> |
54 | | - <h2 class="title">Okeee</h2> |
55 | | - <li>hello</li> |
56 | | - <li>hello2</li> |
57 | | - </ul> --> |
58 | | - |
59 | | - <!-- 6 parentElement |
60 | | - <div class="container"> |
61 | | - <h3>this is a hello world</h3> |
62 | | - <h2>hello world by dncode</h2> |
63 | | - <p> |
64 | | - Lorem ipsum dolor, sit amet consectetur adipisicing elit. Alias, |
65 | | - distinctio! |
66 | | - </p> |
67 | | - </div> --> |
68 | | - |
69 | | - <!-- 7 NextSibling, Previous Sibling |
70 | | - <ul id="result"> |
71 | | - <li>hello1</li> |
72 | | - <li>hello2</li> |
73 | | - <li id="last">hello3</li> |
74 | | - </ul> --> |
75 | | - |
76 | | - <!-- <h1>hohoho</h1> --> |
77 | | - <!-- NextElementSibling , previouselement |
78 | | - <ul id="result"> |
79 | | - <li>hello1</li> |
80 | | - <li>hello2</li> |
81 | | - <li id="last">hello3</li> |
82 | | - </ul> --> |
83 | | - |
| 18 | + <!-- getElementById for id --> |
| 19 | + <div id="container"> |
| 20 | + <h2 id="title">Hello World</h2> |
| 21 | + </div> |
84 | 22 | <!-- source js --> |
85 | | - <!-- <script src="https://github.com/01_getElementById.js"></script> --> |
| 23 | + <script src="/01_getElementById.js"></script> |
86 | 24 | <!-- <script src="/02_getElementByTagName.js"></script> --> |
87 | 25 | <!-- <script src="/03_getElementByClassName.js"></script> --> |
88 | 26 | <!-- <script src="/04_querySelector.js"></script> --> |
89 | 27 | <!-- <script src="/05_children.js"></script> --> |
90 | 28 | <!-- <script src="/06_parentElement.js"></script> --> |
91 | 29 | <!-- <script src="/07_nextSibling_previous.js"></script> --> |
92 | | - <script src="/08_nextElementSibling_previous.js"></script> |
| 30 | + <!-- <script src="https://github.com/08_nextElementSibling_previous.js"></script> --> |
93 | 31 | <!-- <script src="/09_textContent.js"></script> --> |
94 | 32 | <!-- <script src="/10_getAttribute.js"></script> --> |
95 | 33 | </body> |
|
0 commit comments