0
How can I make this clock work?
3 RĂ©ponses
0
I go through your code i found some code problem
You have passed as "div" as I'd in getElementById() method but in HTML you haven't provide id= "div" anywhere
Please check this again from wherever you copying this.
+ 2
Raj Singh,
This code is working..
What specific do you want to do in this code?
+ 2
(ââ _â ) Try it
function x(){
let time = new Date();
let second = time.getSeconds();
let minute = time.getMinutes();
let hour = time.getHours();
document.getElementById('div').innerHTML = day[time.getDay()]+' : '+ hour +' : '+ minute + ' : '+ second
}