/ Published in: JavaScript
You can use this script to always keep the copyright notice on the footer of your website current. For example, instead of having to update the year at the beginning of each year, this script will display current year. I'm sure there's an easier way of doing this, but I ran across it tonight and thought it was a clever idea. When putting it in your code, it would look something like "Copyright 2001[script goes here]"
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script language="JavaScript"> var d=new Date(); yr=d.getFullYear(); if (yr!=2002) document.write("-"+yr); </script>