Displaying the Current/Live Date & Time on a Web Page [JavaScript Tutorial]



In this tutorial, you will learn how to display the current date and time on your web page using JavaScript and CSS for the styling.

I apologise in advance for any sound issues throughout this tutorial, as I am in need of a new microphone for recording.

If you enjoyed this tutorial or if you found it useful in any way, don’t forget to give it ‘thumbs up’.

Share this video with anyone who you think may be interested in learning how to display the date and time on their website using JavaScript.

Leave any suggestions in the comment section below for future tutorials that you’d like me to make and upload. I will try my best to do them all.

Don’t forget to subscribe to be notified as and when I upload a new web tutorial:

Follow me on Twitter:

Follow me on Instagram:

Software that I use:
– EZvid
– Adobe Photoshop
– Sublime Text 2

Nguồn: https://hdwallpaperslovely.com

Xem thêm bài viết khác: https://hdwallpaperslovely.com/cong-nghe/

Related Posts

Usando o Programa mfastboot para Verificar Modelo e Versão de Aparelhos Motorola

March 19, 2020

March 19, 2020 40

Nesse tutorial vamos ensinar a usar um comando muito importante que permite verificar o modelo correto do aparelho e a...

طريقة صناعة ملف ADB Enable لفك حماية جوجل اكاونت FRP

February 27, 2020

February 27, 2020 12

طريقة صناع ملف ADB Enable لفك حماية جوجل اكاونت FRP رابط البرنامج على سبورت الجيم فلاش : ————————————— ADB Enable...

Google Camera on Mi A1 Android Pie | Enable Camera2 Api

April 2, 2020

April 2, 2020 40

With this guide you can enable camera2 api on your MI A1 Android Pie phone. After that you can install...

BYPASS GOOGLE ACCOUNT SAMSUNG NOT8, S8, S8+ LATEST security with Enable ADB

February 5, 2020

February 5, 2020 8

click here : BYPASS GOOGLE ACCUONT FRP GALAXY S8 PLUS SM G955F & S8 SM G950F : Remove FRP LG...

CRACK OPTICAL FLARES [32 BITS] – AFTER EFFECTS CS4

April 11, 2020

April 11, 2020 4

1080p —————————————————————————— READ ME ! —————————————————————————– Hi everyone! This is a new tutorial where I show you how to crack...

Trên Tay Pin Sạc Dự Phòng GrownTech 8000mAh giá sao lại rẻ thế ?

March 17, 2020

March 17, 2020 1

Chào các bạn trong video này mình xin mở hộp và trên tay review cho bạn về sản phẩm, pin...

How to Format a USB Flash Drive using Command Prompt in Windows

May 22, 2020

May 22, 2020 37

In this video, I will show you step-by-step, on how to format a USB Flash Drive using Command Prompt on...

Android Studio Virtual Device Error Solved

May 22, 2020

May 22, 2020 25

In this video, I’m gonna solve the error pops up every time you try to run Android Virtual Device(AVD) which...

NEMEZIZ 19+ UNBOXING & BOOT TEST | PRO:DIRECT DELIVERY

April 30, 2020

April 30, 2020

PRO:DIRECT HOOKED ME UP WITH THE LATEST NEMEZIZ 19+ – HERE IS MY UNBOXING & BOOT TEST. GET 10% OFF...

Secret Codes SAMSUNG Galaxy S9 – Hidden Mode / Tricks / Tips

March 4, 2020

March 4, 2020 12

How to open hidden menu in SAMSUNG Galaxy S9? How to get access to hidden features in SAMSUNG Galaxy S9?...

AM AJUNS PE LOCUL 5 IN LUME in ZOOBA!

February 13, 2020

February 13, 2020 36

URMARESTE-MA PE INSTAGRAM: ➤ ➤ Ma puteti sustine cumparand produse de pe link-urile de mai jos. Voi primi 2% din...

Adobe Illustrator CS5 – My Top 5 Favorite Features

May 8, 2020

May 8, 2020 43

Adobe has released the NEW Creative Suite 5 and I thought I would share with you my Top 5 Favorite...

(HOT) Săn Hàng Giá 0 Đồng Tại Lotte | Mua Nhanh Kẻo Hết

March 19, 2020

March 19, 2020 1

chào các bạn hôm nay mình xin chia sẽ cho các bạn chương trình Săn Hàng Giá 0 Đồng Tại...

ATK – Frp Remover 2020 Powerful Tool for Latest Security Patch

March 13, 2020

March 13, 2020 3

Bypass #Google #FRP lock on any #Android phones. Frp Bypass Latest Tools Name Is ATK – Frp Remover.This Frp Unlocker...

Adobe After Effects CC 2019

April 11, 2020

April 11, 2020 20

Olá! Neste vídeo mostro o passo a passo de como instalar e ativar o Adobe After Effects CC 2019. Além...

Comments
  • Can this live date be added to a clickfunnels funnel? I entered the html part in the html/js element on clickfunnels. I entered the css portion on the css portion of clickfunnels. This code did not work on clickfunnels.

  • This is really good. It will help me in my future part time job during high school thanks so much

  • … everything works, but the seconds only update when the webpage is refreshed, why isn't the seconds animating on the webpage, other than that, great job!

  • Yo. Good tutorial but there were so many words. If you felt the same way. RhymBil video on date and time was like one line ling and it still worked

  • DIDNT WORK FOR ME

    function renderTime(){
    //date
    var mydate = new Date();
    var year = mydate.getYear();
    if(year < 1000){
    year +=1900;

    }

    var day = mydate.getDay():
    var month = mydate.getMonth();
    var daym = mydate.getDate();
    var dayarray = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
    var montharray = new Array("January","February","March","April","May","June","July","August","September","October","Novermber","December");
    //date end

    // TIME
    var currentTime = new Date();
    var h = currentTime.getHours();
    var m = currentTime.getMinutes();
    var s = currentTime.getSeconds();
    if(h == 24){
    h = 0;
    } else if(h > 12){
    h = h – 0;
    }

    if (h < 10){
    h = "0" + h;
    }

    if(m < 10){
    m = "0" + m;
    }

    if(s < 10){
    s = "0" + s;
    }

    var myClock = document.getElementById("clockDisplay");
    myClock.textContent = "" +dayarray[day]+ " " +daym+ " " +montharray[month]+ " " +year+ " | " +h+ ":" +m+ ":" +s;
    myClock.innerText = "" +dayarray[day]+ " " +daym+ " " +montharray[month]+ " " +year+ " | " +h+ ":" +m+ ":" +s;

    setTimeout("renderTime()", 1000);
    }
    renderTime();

Leave a Reply

Your email address will not be published. Required fields are marked *