实现脚本的异步载入和执行

function loadasync(url){
  var head = document.getElementsByTagName("head")[0];
  var s = document.createElement("script");
  s.src = url;
  head.appendChild(s);
}
原文地址:https://www.cnblogs.com/zjtTT/p/5096535.html