- 1
Why is this code not working?
I am very confused. Please help.(The corresponding HTML is fine. function setText() { var a = document.getElementById("demo"); var arr = a.childNodes; arr[0].innerHTML="Hello! How are you?"; } setTimeout(setText, 500);
1 Answer
0
Make loop like: var arr = a.childNodes;
for(var x=0;x<arr.length;x++)



