var today=new Date();
var abc=today.getMonth();
switch (abc) {
case 0:
document.write("现在是春季");
break;
case 1:
document.write("现在是春季");
break;
case 2:
document.write("现在是春季");
break;
case 3:
document.write("现在是夏季");
break;
case 4:
document.write("现在是夏季");
break;
case 5:
document.write("现在是夏季");
break;
case 6:
document.write("现在是秋季");
break;
case 7:
document.write("现在是秋季");
break;
case 8:
document.write("现在是秋季");
break;
case 9:
document.write("现在是冬季");
break;
case 10:
document.write("现在是冬季");
break;
case 11:
document.write("现在是冬季");
break;
}
原文:https://www.cnblogs.com/max-hou/p/8902346.html