通过js来获取系统日期,然后自动判断当前所属季节并显示出来,结合自己的需求来修改这个特效即可。
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var now = new Date(); var month = now.getMonth() + 1; var date = now.getDate(); var year = now.getYear(); var season; if (month >= 1 && month <= 3) season = "冬季"; if (month == 3 && date > 19) season = "春季"; if (month > 3 && month <= 6) season = "春季"; if (month == 6 && date > 20) season = "夏季"; if (month > 6 && month <= 9) season = "夏季"; if (month == 9 && date > 21) season = "秋季"; if (month > 9 && month <= 12) season = "秋季"; if (month == 12 && date > 20) season = "冬季"; //Y2K Fix //武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) if (year < 2000) year = year + 1900; //Winter Season Fix if (season == "Winter") year = year - 1; document.write(year + "年 " + season); // End --> </script>
本文来自武鸣人网站,转载请注明出处