标签:
编辑您的代码:
<html> <body>
<script type="text/javascript">
var d=new Date()
var weekday=new Array(7)
weekday[0]="星期日"
weekday[1]="星期一"
weekday[2]="星期二"
weekday[3]="星期三"
weekday[4]="星期四"
weekday[5]="星期五"
weekday[6]="星期六"
document.write("今天是" + weekday[d.getDay()])
</script>
</body>
</html>
查看结果:
今天是星期二
标签:
原文地址:http://www.cnblogs.com/zifashaonian10000/p/4221814.html