<script language="javascript">
var now = new Date();
var day = now.getDay();
var week ;
switch(day ){
case 1:
week="星期一";
break;
case 2:
week="星期二";
break;
case 3:
week="星期三";
break;
case 4:
week="星期四";
break;
case 5:
week="星期五";
break;
case 6:
week="星期六";
break;
case 7:
week="星期日";
break;
}
docment.write("今天是"+week);
</script>
javascript判断今天是周几
最新推荐文章于 2024-08-26 10:07:06 发布