Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 1
Script error
I dont know why this code works on a laptop, but it fails here for the script https://code.sololearn.com/WIezmSpLcCr9/?ref=app
4 Respostas
+ 4
onload = function() {
document.getElementById('aparatCarts').innerHTML=html;
}
+ 4
Because the JavaScript codes on JS pane is injected into head tag node.
It run the JavaScript codes before DOM is successsfully loaded.
Thus allow it to be called back by onload function would make sure the DOM is loaded before executing the codes.
0
CalviÕ²
tanks man its work šš
0
CalviÕ² But why should I use onload here?