阅读背景:

异步加载JavaScript文件和回调。

来源:互联网 

I am trying to write an ultra simple solution to load a bunch of JS files asynchronously. I have the following script below so far. However the callback is sometimes called when the scripts aren't actually loaded which causes a variable not found error. If I refresh the page sometimes it just works because I guess the files are coming straight from the cache and thus are there quicker than the callback is called, it's very strange?I am trying to write an ultra simple solution t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: