From a9e4a94ddf5fa3de825f59e5736a60aeff6a81cc Mon Sep 17 00:00:00 2001 From: SuvamPrasd Date: Tue, 29 Oct 2019 14:03:45 +0530 Subject: [PATCH] Fixed and enhanced display issue --- digital-clock/index.html | 33 ++++++++++++++++++++++++++++++--- digital-clock/script.js | 19 ------------------- 2 files changed, 30 insertions(+), 22 deletions(-) delete mode 100644 digital-clock/script.js diff --git a/digital-clock/index.html b/digital-clock/index.html index ff9c4b1..752ca9c 100644 --- a/digital-clock/index.html +++ b/digital-clock/index.html @@ -1,14 +1,41 @@ + Javascript Digital Clock - + + + +
- jjj +

- + + + + \ No newline at end of file diff --git a/digital-clock/script.js b/digital-clock/script.js deleted file mode 100644 index ec1c6aa..0000000 --- a/digital-clock/script.js +++ /dev/null @@ -1,19 +0,0 @@ -(function() { - function addZeroBefore(v) { - return +v < 10 ? "0" + +v : v; - } - - function showTime() { - - var today = new Date(); - var textTime = addZeroBefore(today.getHours()) + " : " + addZeroBefore(today.getMinutes()) + " : " + addZeroBefore(today.getSeconds()); - - document.getElementById("time").innerHTML = textTime; - - setTimeout(function() { - showTime() - }, 1000); - } - - showTime(); -})(); \ No newline at end of file