JS获取当前年份
<script type="text/javascript">document.write((new Date()).getFullYear());</script>
可插入到页脚版权年份处,无需每年手动更新。例如:
<p style="text-align:center">Copyright © <script type="text/javascript">document.write((new Date()).getFullYear());</script> BitPD. All Rights Reserved.</p>
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容