+ 1
why this code is not working
hey guys i make a program in javascript , but this code is not working , anyone can help me ----https://code.sololearn.com/Wl0GkkaXau58/#html
5 Answers
+ 4
Explanation:
The JavaScript codes runs first before the DOM(HTML tags)loaded
Write your code inside the onload() function
Like this
window.onload=function(){
//JavaScript code
}
This will make sure that the DOM loaded first
+ 3
Write the js like this:
window.onload=function(){
//your js
}
+ 1
đ· Alex Tusinean đ„ and Farhan;//Exams/LessActive , thanks
0
Put your script source in the <head> tag