18th Sep 2023, 3:15 AM
Raj Singh
Raj Singh - avatar
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.
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