File tree Expand file tree Collapse file tree 4 files changed +63
-0
lines changed Expand file tree Collapse file tree 4 files changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < title > Create Element Node</ title >
7
+ </ head >
8
+ < body >
9
+ < div id ="myid ">
10
+ < h1 > We are learing javascript</ h1 >
11
+ </ div >
12
+ < script >
13
+ // create Element Node
14
+ var nENode = document . createElement ( "h3" ) ;
15
+ console . log ( nENode ) ;
16
+ </ script >
17
+ </ body >
18
+ </ html >
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < title > Comment Node</ title >
7
+ </ head >
8
+ < body >
9
+ < script >
10
+ var nCNode = document . createCommentNode ( 'comment node' ) ;
11
+ console . log ( nCNode )
12
+ </ script >
13
+ </ body >
14
+ </ html >
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < title > Create Docuemnt Fragment</ title >
7
+ </ head >
8
+ < body >
9
+ < script >
10
+ var dof = document . createDocumentFragment ( ) ;
11
+ console . log ( dof ) ;
12
+ </ script >
13
+
14
+ </ body >
15
+ </ html >
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
+ < title > Craete TextNode</ title >
7
+ </ head >
8
+ < body >
9
+ < script >
10
+ // create text node
11
+ var nTNode = document . createTextNode ( "Text created" ) ;
12
+ console . log ( nTNode ) ;
13
+
14
+ </ script >
15
+ </ body >
16
+ </ html >
You can’t perform that action at this time.
0 commit comments