标签:
1 function downloadJSAtOnload() { 2 var element = document.createElement("script"); 3 element.src = "defer.js"; 4 document.body.appendChild(element); 5 } 6 if (window.addEventListener) 7 window.addEventListener("load", downloadJSAtOnload, false); 8 else if (window.attachEvent) 9 window.attachEvent("onload", downloadJSAtOnload); 10 else window.onload = downloadJSAtOnload;
标签:
原文地址:http://www.cnblogs.com/leilin007/p/4485722.html