Page 1 of 1

Create an auto updating copyright Notice!

Posted: Mon Mar 27, 2006 7:22 am
by znad
Just copy and paste the following script in the bottom of your webpages, it will automatically keep your copyright notice updated.

Code: Select all

<script language="JavaScript">
<!--
function y2k(number) { return (number < 1000) ? number + 1900 : number; }
var today = new Date();
var year = y2k(today.getYear());
****.write('© '+year+' site.com- All Rights Reserved');
//-->
</script>

Posted: Fri Mar 31, 2006 1:02 pm
by kaos_frack
nice trick
but it really relies on the users time
if the users time settings are not correct
then you may have problems

Posted: Fri Mar 31, 2006 3:14 pm
by Mizo
yah o agree with kaos_frack

Posted: Thu Jun 01, 2006 10:53 pm
by redwall_hp
Do something with PHP/SHTML to get it from the server. You could do something similar to do an auto-updating "last edited on:" thing too.

Posted: Mon Jun 05, 2006 5:50 am
by uz
which part of the code should we put? body? head? or css styles?