+ 1
How to insert current time in html using javascript?
HTML css js
2 Answers
+ 14
Hopefully, this link can be a clue
[https://stackoverflow.com/questions/23994748/display-the-current-date-and-time-using-html-and-javascript-with-scrollable-effe]
+ 1
Date.prototype.timeNow = function () {
return ((this.getHours() < 10)?"0":"") + this.getHours() +":"+ ((this.getMinutes() < 10)?"0":"") + this.getMinutes() +":"+ ((this.getSeconds() < 10)?"0":"") + this.getSeconds();
}
var date = new Date();
date.timeNow();