Last active
November 13, 2017 19:52
-
-
Save nikkaroraa/07f09cec3bfd5c1c4a4e42f746d52440 to your computer and use it in GitHub Desktop.
Creating DOM Node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>DOM Manipulation</title> | |
| </head> | |
| <body> | |
| <p id="paraId">First Paragraph</p> | |
| </body> | |
| <script> | |
| //creating a new element node | |
| var newElementNode = document.createElement('p'); | |
| //creating a new text node | |
| var newTextNode = document.createTextNode("Text content"); | |
| </script> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment