Auto Date for Footer

/ Published in: JavaScript
Save to your folder(s)

i found this snippet here on snipplr (see the link up above), and really liked it. it came up with a validation error under XHTML 1.0 Strict so i changed it to what you see in the bottom.....

Copy this code and paste it in your HTML
  1. &copy; **PUT YEAR HERE** <script type="text/javascript">
  2. var d=new Date();
  3. yr=d.getFullYear();
  4. if (yr!=2002)
  5. document.write("-"+yr);
  6. </script>


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.