Content Network

You are not logged in.
Click here to login.

Some part of this library is not public. You must register to get exclusive access. If you are already registered, click here to login.

Web Development >> 2017

JavaScript Digital Clock

By | | License: proprietary

        <title>JavaScript Digital Clock</title>
            body {
                text-align: center;
            #pTime {
                font-family: monospace;
                font-weight: bold;
                font-size: 2em;
            var pTime;
            function onEachSecond() {
                date = new Date();
                pTime.innerHTML = date.toLocaleTimeString();
            function onLoaded() {
                pTime = document.getElementById("pTime");
                setInterval(onEachSecond, 1000);
    <body onload="onLoaded()">
        <h1>JavaScript Digital Clock</h1>
        <p id="pTime" />

Keywords (click to browse): digital-clock clock time toLocaleString setInterval web internet websites web-designing web-programming web-apps www

JavaScript Digital Clock | Nandakumar Content Network
Copyright © 2015, 2016, 2017 Nandakumar Edamana.