<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://drywallwiki.com/index.php?action=history&amp;feed=atom&amp;title=Javascript</id>
	<title>Javascript - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://drywallwiki.com/index.php?action=history&amp;feed=atom&amp;title=Javascript"/>
	<link rel="alternate" type="text/html" href="https://drywallwiki.com/index.php?title=Javascript&amp;action=history"/>
	<updated>2026-04-19T14:21:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.3</generator>
	<entry>
		<id>https://drywallwiki.com/index.php?title=Javascript&amp;diff=342&amp;oldid=prev</id>
		<title>Jlebeau81: Created page with &quot;&lt;code&gt;&lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt;     &lt;meta charset=&quot;UTF-8&quot;&gt;     &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;     &lt;title&gt;JS Render Example (Original)&lt;/title&gt; &lt;/head&gt; &lt;body&gt;     &lt;h1&gt;Original Page Content&lt;/h1&gt;     &lt;p&gt;This content will be replaced by JavaScript.&lt;/p&gt;     &lt;button onclick=&quot;renderNewPage()&quot;&gt;Render New Page with JavaScript&lt;/button&gt;      &lt;!-- The script runs after the initial content is loaded but before the new content repla...&quot;</title>
		<link rel="alternate" type="text/html" href="https://drywallwiki.com/index.php?title=Javascript&amp;diff=342&amp;oldid=prev"/>
		<updated>2026-01-08T23:20:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;code&amp;gt;&amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt; &amp;lt;head&amp;gt;     &amp;lt;meta charset=&amp;quot;UTF-8&amp;quot;&amp;gt;     &amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width, initial-scale=1.0&amp;quot;&amp;gt;     &amp;lt;title&amp;gt;JS Render Example (Original)&amp;lt;/title&amp;gt; &amp;lt;/head&amp;gt; &amp;lt;body&amp;gt;     &amp;lt;h1&amp;gt;Original Page Content&amp;lt;/h1&amp;gt;     &amp;lt;p&amp;gt;This content will be replaced by JavaScript.&amp;lt;/p&amp;gt;     &amp;lt;button onclick=&amp;quot;renderNewPage()&amp;quot;&amp;gt;Render New Page with JavaScript&amp;lt;/button&amp;gt;      &amp;lt;!-- The script runs after the initial content is loaded but before the new content repla...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;code&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;
&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;meta charset=&amp;quot;UTF-8&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width, initial-scale=1.0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;JS Render Example (Original)&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;h1&amp;gt;Original Page Content&amp;lt;/h1&amp;gt;&lt;br /&gt;
    &amp;lt;p&amp;gt;This content will be replaced by JavaScript.&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;button onclick=&amp;quot;renderNewPage()&amp;quot;&amp;gt;Render New Page with JavaScript&amp;lt;/button&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- The script runs after the initial content is loaded but before the new content replaces it --&amp;gt;&lt;br /&gt;
    &amp;lt;script&amp;gt;&lt;br /&gt;
        function renderNewPage() {&lt;br /&gt;
            const newHTMLContent = `&lt;br /&gt;
                &amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;
                &amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;head&amp;gt;&lt;br /&gt;
                    &amp;lt;meta charset=&amp;quot;UTF-8&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width, initial-scale=1.0&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;title&amp;gt;JS Render Example (New)&amp;lt;/title&amp;gt;&lt;br /&gt;
                    &amp;lt;style&amp;gt;&lt;br /&gt;
                        body {&lt;br /&gt;
                            background-color: lightblue;&lt;br /&gt;
                            color: white;&lt;br /&gt;
                            font-family: sans-serif;&lt;br /&gt;
                            text-align: center;&lt;br /&gt;
                            padding-top: 50px;&lt;br /&gt;
                        }&lt;br /&gt;
                    &amp;lt;/style&amp;gt;&lt;br /&gt;
                &amp;lt;/head&amp;gt;&lt;br /&gt;
                &amp;lt;body&amp;gt;&lt;br /&gt;
                    &amp;lt;h1&amp;gt;Welcome to the New Page!&amp;lt;/h1&amp;gt;&lt;br /&gt;
                    &amp;lt;p&amp;gt;This entire page was generated and rendered using a JavaScript string.&amp;lt;/p&amp;gt;&lt;br /&gt;
                    &amp;lt;p&amp;gt;The original content and button are gone.&amp;lt;/p&amp;gt;&lt;br /&gt;
                &amp;lt;/body&amp;gt;&lt;br /&gt;
                &amp;lt;/html&amp;gt;&lt;br /&gt;
            `;&lt;br /&gt;
&lt;br /&gt;
            // This replaces the entire HTML document structure&lt;br /&gt;
            // document.documentElement gives you the &amp;lt;html&amp;gt; tag&lt;br /&gt;
            document.documentElement.innerHTML = newHTMLContent;&lt;br /&gt;
        }&lt;br /&gt;
    &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jlebeau81</name></author>
	</entry>
</feed>