我已经附加了一个日历并在我的网站上打开,但它似乎没有工作,不知道为什么这里是代码。
<script type="text/javascript">
switch(curday){
case 0:
day = "sunday";
break;
case 1:
day = "<h2>Monday</h2><br/>9:00-12:00 <br/> 12:00-13:00 Lunch<br/> 13:00-19:00<br/>";
break;
case 2:
day = "Tuesday";
break;
case 3:
day = "<h2>Wednesday</h2><br/>9:00-12:00 <br/> 12:00-13:00 Lunch<br/> 13:00-19:00<br/>";
break;
case 4:
day = "Thursday";
break;
case 5:
day = "<h2>Friday</h2><br/>9:00-12:00 <br/> 12:00-13:00 Lunch<br/> 13:00-19:00<br/>";
break;
case 6:
day = "Saturday" "We are closed" ;
break;
}
document.write(day);
</script>
这是日历的代码
<script type="text/javascript">
var todaydate=new Date()
var curmonth=todaydate.getMonth()+1 //get current month (1-12)
var curyear=todaydate.getFullYear() //get current year
document.write(buildCal(curmonth ,curyear, "main", "month", "daysofweek", "days", 1));
</script>