Automatic Date Incrementer
One of the tasks I used to dread in January each year was changing the year in the copyright statements on my web pages. At first, when the site was small, it was just a minor task. Now, with nearly 300 pages of HTML, the task of incrementing all those dates would be huge... if I hadn't found a nifty little piece of script that does the job for me, automatically, every Dec 31st at midnight.
Just take the time to paste it into your HTML once (plus add it into your template.html document) and you need never worry about your copyright statements being out of date again.
In the code below, which you copy and paste into your web pages, simply change the beginning year and the text that will be displayed. That's all there is to it!
You can always do a Copy > Source on this page to see how I've done it. Actually that's a great way to learn how web pages work. I do it all the time.
Whenever I see an effect (such as a table with a red dashed border), I examine the source code of the page to learn how they did it -- then make notes for my files so that when I want to create a table with red dashes for a border, I know just how to do it.
So, let me show you now...
Copyright © 2000 - <SCRIPT LANGUAGE="JavaScript"> <!--
today=new Date();
y0=today.getFullYear();
// end hiding --->
</SCRIPT>
<SCRIPT language="JavaScript">
<!---
document.write(y0);
// --->
</SCRIPT>. Your Name. |
|
For another script to automatically update the year in your copyright notices:
Dynamic Copyright Date
You can't get any more simple than this!
|