Get files into the DOM with Javascript
<p>To avoid the Google Pagespeed Messeger "Parsing Javascript later" I've copied this script.
<code></p>

<pre><code>&lt;script type="text/javascript"&gt;
 function downloadJSAtOnload() {
    var element = document.createElement("script");
    element.src = "http://example.com/templates/name/javascript/jquery.js";
    document.body.appendChild(element);
    var element1 = document.createElement("script");
    element1.src = "http://example.com/templates/name/javascript/jquery.colorbox-min.js";
    document.body.appendChild(element1);
 }
 if (window.addEventListener)
    window.addEventListener("load", downloadJSAtOnload, false);
 else if (window.attachEvent)
    window.attachEvent("onload", downloadJSAtOnload);
 else 
    window.onload = downloadJSAtOnload;
&lt;/script&gt;
</code></pre>

<p></code></p>

<p>How could I solve it with a loop because I need one more javascript file insert into the DOM.</p>

<p>Greets
Ron</p>
