<body>
今日值班人:
<script language="javascript">
<!-- //
d=new Date()
if(d.getDay()==0) document.write("星期天_张天")
if(d.getDay()==1) document.write("星期一_张一")
if(d.getDay()==2) document.write("星期二_张二")
if(d.getDay()==3) document.write("星期三_张三")
if(d.getDay()==4) document.write("星期四_张四")
if(d.getDay()==5) document.write("星期五_张五")
if(d.getDay()==6) document.write("星期六_张六")
// -->
</script>
</body>
</html>
你是要做一个周排班表把,<script>
var work = [["周一","张三","电话1"],["周二","张三","电话2"],["周三","张三","电话3"],["周四","张三","电话4"],["周五","张三","电话5"],["周六","张三","电话6"],["周七","张三","电话7"]]
var week = new Date().getDay()//取星期几
document.write("今天" + work[week-1][0]+","+work[week-1][1]+" 值班,电话:"+work[week-1][2])
</script>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)