标签:cas Oday date() 判断 switch break get bre div
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; }
标签:cas Oday date() 判断 switch break get bre div
原文地址:https://www.cnblogs.com/max-hou/p/8902346.html