Discount !! E-commerce App With Backend Source Code Video and Voice Chatting App Firebase Chatting App Source Code Complete Gym App BLoC State Management Source Code Complete Study App Buy Ticket Booking App Source Code Buy Travel App With Backend Source Code Complete Chat App Udemy Course Special Offer Discount !! Online Learning Course App (BLoC) Online Learning Course App (Riverpod) Online Learning Course App (Getx) Discount !! Shopping App (Provider) Cool Flutter Game Nodejs Flutter Complete App
The above error happens due to many reasons we get Uncaught TypeError: Cannot read property 'children' of null.
Now first you need to check if your document Id which you get through document.getElementById() is correct. This string must be correct one.
It's same for the querySelector.
One big reason it happens due to DOM object is not ready, which means your document ID doesn't exist in the DOM at the moment of execution of this code.
So move it to the right place and don't put in the <head></head> tag section.
Try copying your
<script>code</script> right before the