Reply
Tue 15 Jul, 2014 07:15 am
I would like to add 20 size ariel font, maroon color and center alignment to the code below, thanks.
<script type="text/javascript">
today = new Date();
BigDay = new Date("October 1, 2015");
msPerDay = 24 * 60 * 60 * 1000 ;
timeLeft = (BigDay.getTime() - today.getTime());
e_daysLeft = timeLeft / msPerDay;
daysLeft = Math.floor(e_daysLeft);
e_hrsLeft = (e_daysLeft - daysLeft)*24;
hrsLeft = Math.floor(e_hrsLeft);
minsLeft = Math.floor((e_hrsLeft - hrsLeft)*60);
document.write("<BR> <H4>" + daysLeft + " days " + hrsLeft +" hours and " + minsLeft + " minutes </H4> <P>");
</script>
@sdburns,
I figured it out:
document.write("<font color='800000'> <H2> <CENTER>" + daysLeft + " days " + hrsLeft +" hours and " + minsLeft + " minutes </H2> <P>");