function
funClock() {
var
date =
new
Date();
hours = date.getHours();
minutes = date.getMinutes();
seconds = date.getSeconds();
if
(hours < 10) {
hours =
'0'
+ hours;
}
(minutes < 10) {
minutes =
+ minutes;
(seconds < 10) {
seconds =
+ seconds;
time = hours +
':'
+ minutes +
document.getElementById(
't'
).innerHTML = time;
funMake() {
setInterval(
'funClock()'
, 1000);
<!DOCTYPE html>
<
html
>
head
meta
charset
=
"utf-8"
/>
title
>New Page</
script
src
"js/script.js"
></
</
body
time
id
"t"
funMake();