We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

hellolabs on 09/25/07


Tagged

date


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

francisre


JavaScript: automatic copyright date (buggy)


Published in: JavaScript 


URL: http://www.javascriptkit.com/script/script2/updatedcredit.shtml

  1. <script type="text/javascript">
  2. today=new Date();
  3. y0=today.getFullYear();
  4. </script>
  5.  
  6. <script type="text/javascript">
  7. <!-- Hide from old browsers
  8. document.write(y0);
  9. // end hiding -->
  10. </script>

Report this snippet 

You need to login to post a comment.