irmantas_radavicius

Untitled

Oct 22nd, 2021
845
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.     <head>
  3.         <!--<script src="script.js" defer></script>-->     
  4.     </head>
  5.     <body id="body">
  6.         <p>Lorem ipsum</p>
  7.         <p id="output">Placeholder</p>     
  8.         <p>Lorem ipsum</p>
  9.         <script>                       
  10.             let output = "";
  11.             let bodyContent = document.getElementById("body").innerHTML;
  12.             output += '<div style="background-color: red">' + bodyContent + "</div>";
  13.             output += '<div style="background-color: blue">' + bodyContent + "</div>";
  14.             document.getElementById("output").innerHTML = output;
  15.         </script>
  16.     </body>
  17. </html>
RAW Paste Data