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

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

my-portfolio

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

Bánh Bao Bự – Tập 4 – Pokemon Go and Die
Flycam Sky | ✅ TẢI VÀ CÀI ĐẶT PHẦN MỀM ADOBE PREMIERE PRO CC 2019
Sài Gòn 0 giờ sau chỉ thị cách ly toàn xã hội



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/

COMMENTS

WORDPRESS: 21
  • comment-avatar

    THANK YOU SO MUCH MAN!!! SUPER HELPFUL!!!

  • comment-avatar

    Very much helpful thank you sir

  • comment-avatar
  • comment-avatar

    Thank you for your effort…Thumb up!

  • comment-avatar

    Thank you very much dude! You saved my day!

  • comment-avatar

    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.

  • comment-avatar

    is it work on jsp?

  • comment-avatar

    brother can you help me?

  • comment-avatar

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

  • comment-avatar

    … yes, how does one add PM & AM, also, change military time to display the regular time!

  • comment-avatar

    … 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!

  • comment-avatar

    How to add AM or PM on that clock?

  • comment-avatar

    Good tutorial, but so many ads.

  • comment-avatar
  • comment-avatar

    Nice #Kidschannelyena

  • comment-avatar

    Nice tutorial man, it really helped me out, thank you

  • comment-avatar

    did you have php coding for date and time..??

  • comment-avatar
  • comment-avatar

    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

  • comment-avatar

    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();

  • comment-avatar
  • DISQUS: