页脚的自动日期

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了页脚的自动日期相关的知识,希望对你有一定的参考价值。

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]"
  1. <script language="javascript">
  2. var d=new Date();
  3. yr=d.getFullYear();
  4. if (yr!=2002)
  5. document.write("-"+yr);
  6. </script>

以上是关于页脚的自动日期的主要内容,如果未能解决你的问题,请参考以下文章

页脚的自动日期

用于页脚的jQuery日期选择器

PHP 页脚的自动年更新

将导出查询作为带有页眉和页脚的文本访问

php 年份页脚的短代码

更改部分页脚的背景颜色