js页面--年份自动增加

<script>if (new Date().getFullYear() > 2017) {
    document.write("-" + new Date().getFullYear());
}</script>
// 大于2017年自动加上 - 年份  
原文地址:https://www.cnblogs.com/Liang-Haishan216/p/7798904.html