- 1

I want to run this code. I have error. Thanks you.

running this code. error. https://code.sololearn.com/W1BXITcMXE30/?ref=app

8th Jul 2021, 7:08 AM
Malick Diagne
Malick Diagne - avatar
2 Antworten
0
You need to have paragraph variable of type node. Because you used innerHTML method, it is no longer a node.
8th Jul 2021, 9:11 AM
Bhavik Mahalle
Bhavik Mahalle - avatar
0
Solution: var paragraph = document.getElementById("demo"); paragraph.innerHTML("some text"); document.body.appendChild(paragraph);
8th Jul 2021, 9:14 AM
Bhavik Mahalle
Bhavik Mahalle - avatar