Christmas Timer

Posted by Abel Gancsos on Dec 12, 2011 in Blog |

 

<html>
<head>
<style type="text/css">
span{
	color:blue;
	font-family:chalked,cracked,comic sans ms,chiller;
	font-size: 120pt;
}
</style>

<script type="text/javascript" src="../jquery-1.6.4.min.js">
</script>
<script type="text/javascript">

function update ( )
{
  var now = new Date ( );

  var hours = now.getHours ( );
  var minutes = now.getMinutes ( );
  var seconds = now.getSeconds ( );

  // Pad the minutes and seconds with leading zeros, if required
  minutes = ( minutes < 10 ? "0" : "" ) + minutes;
  seconds = ( seconds < 10 ? "0" : "" ) + seconds;

  //

  var month=now.getMonth()+1;
  var day=now.getDate();
  var year=now.getFullYear();

  // Compose the string for display
  var currentTime = "Months: " + (12-month)+" Days: "+ (23-day)+" Hours: "+(24-hours)+ " Minutes: "+(60-minutes);

  // Update the time display
  document.getElementById("time").firstChild.nodeValue = currentTime;
}

</script>

<title>Christmas Timer</title>
</head>
<body onload="update(); setInterval('update()', 1000 )" bgcolor="red">
<center>
<br/><br/><br/><br/>
<font color="green" face="Arial"><h1>Christmas Timer</h1><br/><br/>

<span id="time">
</span>

</center>
</body>
</html>

Comments are closed.

Copyright © 2012 Abe's the Word All rights reserved. Theme by Laptop Geek.