+ 5
Help me! uncaught typeError 😥
In my previous code 'click me digital clock' There is an error. Run it and it will show the error. tell me how to correct it..Thanks in advance
3 ответов
+ 11
just put your code in this
window.onload = function boot() {
//your code
}
https://code.sololearn.com/WGgPNa81hRp4/?ref=app
+ 5
soloLearn code-playground has some bugs.
also javascript not recognize html DOM elements until the document load completely
you have to use like @Lord Krishna's method OR use js code under your html code..
like this.
https://code.sololearn.com/WrpFAFPtyGGg/?ref=app
+ 4
@lord kirshna Your code have a problem that runs printTime() automatically ( without onclick event).