code: function loadJs(url, ignoreDuplicate, cb) {
          if (ignoreDuplicate && loadedRes[url]) {
              cb && cb();
              return;
          }
          if (ignoreDuplicate && loadingRes[url]) {
              loadingRes[url].push(cb);
              return;
          }
          loadingRes[url] = loadingRes[url] || [];
          var script = d.createElement('script');
          var loaded = false;
          var wrap = function () {
              if (loaded) {
                  return;
              }
              loaded = true;
              loadedRes[url] = true;
              if (ignoreDuplicate) {
                  for (var i = 0; i < loadingRes[url].length; i++) {
                      loadingRes[url][i] && loadingRes[url][i]();
                  }
                  loadingRes[url] = null;
              }
              cb && cb();
          };
          script.setAttribute('src', url);
          script.setAttribute('type', 'text/javascript');
          script.onload = script.onerror = wrap;
          script.onreadystatechange = wrap;
          head.appendChild(script);
      }
docs: load Js and excute it. 加载 JS 并执行它。