页面异步加载,在onload方法中可以看到head已经被加载完成,但是通过document.getElementById方法却拿不到数据?onload方法不是应该在所有异步请求都加载完成后触发的?
window.onload = function(){ console.log('head===',window.document.head); console.log(document.getElementById('test_id')); }
慕田峪4524236
相关分类