+ 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

26th Oct 2017, 1:28 AM
jacksonofgames 28
jacksonofgames 28 - avatar
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
26th Oct 2017, 1:42 AM
Morpheus
Morpheus - avatar
+ 1
Btw you have to press the buttons for the error to occur
26th Oct 2017, 1:28 AM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
Wow thank you
26th Oct 2017, 1:44 AM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
Why did the removeChild() method not work?
26th Oct 2017, 1:45 AM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
Thank you very much
26th Oct 2017, 2:00 AM
jacksonofgames 28
jacksonofgames 28 - avatar
+ 1
But why could you not access the body in html through a variable? Usually you can
26th Oct 2017, 7:33 PM
jacksonofgames 28
jacksonofgames 28 - avatar
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
26th Oct 2017, 1:55 AM
Morpheus
Morpheus - avatar
- 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
26th Oct 2017, 11:33 PM
Morpheus
Morpheus - avatar