Attendance/static/time.js

22 lines
674 B
JavaScript
Raw Permalink Normal View History

2021-09-18 07:04:31 -07:00
(function () {
function checkTime(i) {
return (i < 10) ? "0" + i : i;
}
function startTime() {
var today = new Date(),
y = today.getFullYear(),
mm = checkTime(today.getMonth() + 1),
d = checkTime(today.getDate()),
h = checkTime(today.getHours()),
m = checkTime(today.getMinutes()),
s = checkTime(today.getSeconds());
document.getElementById('showTime').innerHTML = y + "/" + mm + "/" + d + " " + h + ":" + m + ":" + s;
t = setTimeout(function () {
startTime()
}, 500);
}
startTime();
2021-12-12 02:38:10 -08:00
})();
$(window).resize();
$(window).scroll();