Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body>
- <p id="intro">Hello World!</p>
- <p>This example demonstrates the <b>getElementById</b> method!</p>
- <p id="demo"></p>
- <script>
- var myElement = document.getElementById("intro");
- document.getElementById("demo").innerHTML =
- "The text from the intro paragraph is " + myElement.innerHTML;
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment