Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.78 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <style>
  6. p {
  7.   text-align: center;
  8.   font-size: 60px;
  9.   margin-top: 0px;
  10. }
  11. </style>
  12. </head>
  13. <body>
  14. <img src='mujib.png' width="600" height="600" class="center">
  15. <p id="demo"></p>
  16.  
  17. <script>
  18. // Set the date we're counting down to
  19. var countDownDate = new Date("Mar 17, 2020 00:01:00").getTime();
  20.  
  21. // Update the count down every 1 second
  22. var x = setInterval(function() {
  23.  
  24.   // Get today's date and time
  25.   var now = new Date().getTime();
  26.    
  27.   // Find the distance between now and the count down date
  28.   var distance = countDownDate - now;
  29.    
  30.   // Time calculations for days, hours, minutes and seconds
  31.   var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  32.   var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  33.   var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  34.   var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  35.    
  36.    
  37.   // Output the result in an element with id="demo"
  38.   document.getElementById("demo").innerHTML = days + " দিন " + hours + " ঘন্টা "
  39.  + minutes + " মিনিট " + seconds + " সেকেন্ড ";
  40.  //document.getElementById("demo").innerHTML = days  +'     ' +  hours + '   '
  41.   //+ minutes +'    ' + seconds ;
  42.  //+ "দিন " + "ঘন্টা " + "মিনিট " + "সেকেন্ড "
  43.  
  44.   document.getElementById("demo").style.color = 'blue' ;
  45. document.getElementById("demo").style.fontSize = '300%' ;
  46. document.getElementById("demo").style.textAlign = "left"
  47.    
  48.   // If the count down is over, write some text
  49.   if (distance < 0) {
  50.    clearInterval(x);
  51.    document.getElementById("demo").innerHTML = "EXPIRED";
  52.  }
  53. }, 1000);
  54. </script>
  55.  
  56. </body>
  57. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement