0
why .innerHTML not working in sololearn
if i try something like: document.getElementById(id).innerHTML = 'some str' its return error. what's the problem?
2 Answers
+ 2
I think because your js code runs before the actual DOM even exist.
try this :
window.onload = () => {
// your code goes here
}
+ 2
What is the I'd there? Is it in proper way?
Where is actual code? Showing that may help to identify..!!!!