+ 1
What is this error?
I don't understand the error that this code produces, and I was wondering if someone could tell me why that particular error occurs. https://code.sololearn.com/WY6iAAaxVDbb/?ref=app
8 Réponses
0
can do it simply by changing inner html to blank space, you r having error because you are using remove child , when there is no children for those selected elements
https://code.sololearn.com/WCpfd5K3JaIO/?ref=app
+ 1
Btw you have to press the buttons for the error to occur
+ 1
Wow thank you
+ 1
Why did the removeChild() method not work?
+ 1
Thank you very much
+ 1
But why could you not access the body in html through a variable? Usually you can
0
if u want to use remove child , access the body properly , just do this
go to JS
replace ' body' with document.getElementById("body") and see the magic , btw here's the code for that too
https://code.sololearn.com/WT7EGe1v02e3/?ref=app
- 1
can use body too, but inside the function, check it out one with ur body variable, other by that document.get bla bla method😋
https://code.sololearn.com/WT7EGe1v02e3/?ref=app