code: function createJSScript(id, src, cb) {
    var headElement = document.getElementsByTagName("head")[0];
  
    var scripter = document.createElement('script');
    scripter.setAttribute("type", 'text/javascript');
    scripter.setAttribute("id", id);
    if (src.indexOf('http') === 0 || src.indexOf('/') === 0) {
      scripter.onload = scripter.onreadystatechange = function () {
        if (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete') {
          ImmitSax.data[id] = 'finish'
          setTimeout(function(){
            ImmitSax.roll(id)
            ImmitSax.off(id)
          }, 200);
        }
      }
      // if (src.lastIndexOf('.js')==-1) src += '.js'
      scripter.setAttribute("src", src);
      headElement.appendChild(scripter);
    }
    else {
      scripter.appendChild(document.createTextNode(src))
      headElement.appendChild(scripter);
      ImmitSax.data[id] = 'finish'
      ImmitSax.roll(id)
      ImmitSax.off(id)
    }
  }
docs: 生成js引用或者inner code