HOME | SERVICES | CONTACT | PORTFOLIO | MUSIC

Neat little script

Here is a neat little javascript I've been using to add a dynamic date to your website....

Place this first bit before the opening body tag:



<script language="JavaScript">
<!--
dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
now = new Date
// -->

</script>

Then... Place this next bit.. in the DIV or Table or... where ever that you want the date to display.


<SCRIPT LANGUAGE="JavaScript">
document.write(dayName[now.getDay()] + ", " + monName[now.getMonth()] + " " + now.getDate() + ", " + now.getFullYear() + "." );
</script>
That's it! Short and sweet.. Enjoy

Related Blog Entries

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Content Copyright © 2005 Owen Consulting - All Rights Reserved | This Blog Powered by BlogCFC version 5.9.1.002.