|
Viewing Single Post From: [CODE] Countdown Timer
|
|
16.5th Dimension
|
May 26 2007, 10:43 AM
|
- Posts:
- 1
- Group:
- Members
- Member
- #85,261
- Joined:
- December 16, 2005
|
- Stephen
- April 9, 2003 03:29 PM
Try this: - Code:
-
<br><script language="javascript" type="text/javascript"><!--var date = new Date(ENTER DATE);var now = new Date();var diff = date.getTime() - now.getTime();var days = Math.floor(diff / (1000 * 60 * 60 * 24));document.write("<b>" + (days + 1) + " ENTER TEXT HERE</b>" );//--></script><br>
OR - Code:
-
<br> <script language="javascript" type="text/javascript"> <!-- var date = new Date('ENTER DATE'); var now = new Date(); var diff = date.getTime() - now.getTime(); var days = Math.floor(diff / (1000 * 60 * 60 * 24)); document.write("<b><font color="white">" + (days + 1) + " ENTER TEXT</b></font>" ); //--> </script> <br>
Also if you need to center it: - Code:
-
<center>code here </center>
I hope this helps
Could you possibly explain how to use this code? I need a countdown timer, but I don't where I'm supposed to put in stuff, such as the date that I'm counting down to. I would assume the "ENTERDATE" thing, but how would I format the date?
|
|
|