Cara Membuat Coundown Timer sesuai tanggal/waktu dengan html dan JavaScript

Bagaimana cara membuat Countdown timer sesuai tanggal/waktu dengan JavaScript

Pastekan Saja Kode Dibawah ini, Ubah tanggalnya sesuai tanggal akhir yang ingin kalian tetapkan, Untuk Menampilkan Text CountDownnya silahkan Ubah Paragraph dengan id demo

  <p id="demo"></p>  
 // Set the date we're counting down to  
 var countDownDate = new Date("Jan 31, 2022 23:59:25").getTime();  
 // Update the count down every 1 second  
 var x = setInterval(function() {  
  // Get today's date and time  
  var now = new Date().getTime();  
  // Find the distance between now and the count down date  
  var distance = countDownDate - now;  
  // Time calculations for days, hours, minutes and seconds  
  var days = Math.floor(distance / (1000 * 60 * 60 * 24));  
  var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));  
  var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));  
  var seconds = Math.floor((distance % (1000 * 60)) / 1000);  
  // Output the result in an element with id="demo"  
  document.getElementById("demo").innerHTML = days + "d " + hours + "h "  
  + minutes + "m " + seconds + "s ";  
  // If the count down is over, write some text   
  if (distance < 0) {  
   document.getElementById("demo").innerHTML = "EXPIRED";  
 }, 1000);  

445 Replies to “Cara Membuat Coundown Timer sesuai tanggal/waktu dengan html dan JavaScript”

  1. I have been browsing online more than three hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my view, if all website owners and bloggers made good content as you did, the internet will be a lot more useful than ever before.

  2. What i do not understood is in truth how you are not actually a lot more smartly-liked than you may be now. You are very intelligent. You realize therefore significantly in the case of this topic, produced me individually imagine it from numerous numerous angles. Its like men and women don’t seem to be fascinated until it is one thing to do with Woman gaga! Your own stuffs nice. All the time care for it up!

  3. What i do not realize is in fact how you are no longer actually much more well-favored than you might be right now. You’re very intelligent. You recognize thus considerably in relation to this topic, made me in my view believe it from numerous numerous angles. Its like men and women are not fascinated until it is one thing to do with Lady gaga! Your own stuffs excellent. All the time handle it up!

  4. I do agree with all the ideas you have introduced on your post. They are very convincing and will definitely work. Still, the posts are very short for newbies. May just you please prolong them a little from subsequent time? Thank you for the post.

  5. I do trust all the ideas you’ve presented in your post. They are really convincing and will definitely work. Nonetheless, the posts are too short for newbies. May just you please lengthen them a bit from next time? Thank you for the post.

  6. Simply wish to say your article is as amazing. The clearness in your post is just nice and i could assume you’re an expert on this subject. Well with your permission let me to grab your feed to keep updated with forthcoming post. Thanks a million and please carry on the gratifying work.

  7. Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something. I think that you could do with some pics to drive the message home a little bit, but instead of that, this is fantastic blog. An excellent read. I will certainly be back.

  8. generic zithromax online paypal [url=]cost of generic zithromax[/url] zithromax 250

  9. This is the right blog for anyone who hopes to understand this topic.
    You understand so much its almost hard to argue with you (not that I actually will need to…HaHa).
    You certainly put a new spin on a topic that’s been discussed
    for many years. Excellent stuff, just excellent!

Leave a Reply

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