求值班表html代码

求值班表html代码,第1张

<html>

<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>


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/6106762.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-15
下一篇 2023-03-15

发表评论

登录后才能评论

评论列表(0条)

保存