How can I make this clock work? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
18th Sep 2023, 3:15 AM
Raj Singh
Raj Singh - avatar
3 Respostas
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.
18th Sep 2023, 8:23 AM
Vinay
Vinay - avatar
+ 2
Raj Singh, This code is working.. What specific do you want to do in this code?
18th Sep 2023, 4:12 AM
Darpan kesharwanišŸ‡®šŸ‡³[InactivešŸ“š]
Darpan kesharwanišŸ‡®šŸ‡³[InactivešŸ“š] - avatar
+ 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 }
18th Sep 2023, 5:35 AM
SoloProg
SoloProg - avatar