DIR : /home/kozerus/public_html/ko/timer3.html

/home/kozerus/public_html/ko

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
	p {
		text-align: center;
		font-size: 60px;
		margin-top: 0px;
		}
	</style>
	</head>

<body bgcolor=linen>
	<div id=div_timer3>
		<h1>div_timer3</h1>
		</div id=div_timer3_end>
		
<p id="demo"></p>

<script>
// Set the date we're counting down to
//	var countDownDate = new Date("Jan 5, 2021 15:37:25").getTime();
	var countDownDate = new Date("Feb 27, 2023 18:01:25").getTime();

// Update the count down every 1 second
// Get today's date and time
// Find the distance between now and the count down date
// Time calculations for days, hours, minutes and seconds
// Output the result in an element with id="demo"

	var x = setInterval(function() {
		var now = new Date().getTime();
		var distance = countDownDate - now;
    
		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);
   		htmout=""; 
		if( document.getElementById("div_timer3")) {
			htmout+=days+"d "+hours+"h"+minutes+"m "+seconds+"s ";
			htmout+="<h2><b>distance="+distance+"</b></h2>";
			htmout+="<h3>countDownDate="+countDownDate+"</h3>\n";
			htmout+="<h3>now="+now+"</h3>\n";
			document.getElementById("div_timer3").innerHTML=htmout;
			}
    
// If the count down is over, write some text 
		if (distance < 0) {
			clearInterval(x);
			document.getElementById("div_timer3").innerHTML = "EXPIRED";
			}
		}, 1000);
		</script>

</body>
</html>
//


koh5_pano



Your browser does not support the HTML5 canvas element.


Drag mouse to navigate.

Navigation





17.Aug.2010, Martin Wengenmayer