гугл помагае
var script= document.createElement('script');
script.type= 'text/javascript';
script.onreadystatechange= function () {
if (this.readyState == 'complete') helper();
}
script.onload= helper;
script.src= 'helper.js';
document.getElementsByTagName('head')[0].appendChild(script);
ready states :
Цитата:
|
0 uninitialized
1 loading
2 loaded
3 interactive
4 complete
|