0

Javascript

I tried writing this external Dom in js and it did not work . I now wrote another one in internal and it worked Any problem why it didn't work https://sololearn.com/compiler-playground/Ww6wlpHOVz8X/?ref=app

14th Dec 2024, 9:18 AM
IFEANYICHUKWU HENRY OKWOR
IFEANYICHUKWU HENRY OKWOR - avatar
5 Réponses
+ 3
Wrap your js code inside window.onload function to make sure DOM content load completly before any script. window.onload = () => { //Your js code }
14th Dec 2024, 10:17 AM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 2
IFEANYICHUKWU HENRY OKWOR Yeah sometimes it is must but I use it in my every js project.
14th Dec 2024, 12:17 PM
Gulshan Mahawar
Gulshan Mahawar - avatar
+ 1
Gulshan Mahawar thanks But why does the . value not work
14th Dec 2024, 10:56 AM
IFEANYICHUKWU HENRY OKWOR
IFEANYICHUKWU HENRY OKWOR - avatar
+ 1
And is it a must to use the onload when writing JavaScript
14th Dec 2024, 10:56 AM
IFEANYICHUKWU HENRY OKWOR
IFEANYICHUKWU HENRY OKWOR - avatar
0
Also the . value does not work Please check ✅ it out of
14th Dec 2024, 9:26 AM
IFEANYICHUKWU HENRY OKWOR
IFEANYICHUKWU HENRY OKWOR - avatar