0
DOM JS
I thought, i understand the DOM concept but by taking the code below i am confuse: var elem = document.getElementsById("demo"); elem.innerHTML = "Hi"; Using the "variable.innerHTML" will outputs what is in the quotes?? here for example : Hi ? When running this i get an error but i think everything is Ok! Please any suggestion to help me understand well this concept.
2 ответов
+ 5
Your code is correct.
You get null because SoloLearn puts scripts in head.
https://www.sololearn.com/post/90825/?ref=app
0
Ah okay, Thanks you