Use SWFObject to embed the SWF, then use the callback function to poll the SWF's PercentLoaded value.
If the value is 0, the SWF has not loaded yet. When it hits 100, the SWF is fully loaded.
Here's a tutorial for polling PercentLoaded, complete with code examples.
浏览器去加载这些资源或者是异步去发
http请求的话,一般都会提供钩子函数。例如,你异步去获取
js代码:你创建的
script对象上提供了加载的钩子函数:onload/onreadystatechange(浏览器的兼容性处理),当你把script标签插入到DOM中时,浏览器另开一个线程去异步加载你需要的js资源,在加载的不同阶段:this.readyState对应不同的值,这个时候根据需要设置你的回调函数。这样就完成了对于一段js代码异步获取的监控。onload事件或者readystatechange事件,但不是所有对象都支持。另外promise应该也能吧
http://stackoverflow.com/ques...
可以考虑ajax或者fetch API