< script type="text/javascript"> function parseJSAtOnload() { var element = document.createElement("script"); element.src = "script_to_be_deferred.js"; document.body.appendChild(element); } if (window.addEventListener) window.addEventListener("load", parseJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload", parseJSAtOnload); else window.onload = parseJSAtOnload;