0
[SOLVED] text content is not setting value
Hey guys i get a problem whenever i am using getElementById in sololearn its always shows me an error <p id="demo"></p> document.getElementById("demo").textContent = "Hello world"; and its shows me error
1 Answer
+ 2
Wrap the code in your JS in window.onload = function () { code here }