代码:
<SCRIPT LANGUAGE="JavaScript"> <!-- Begin var today = new Date(); var Day = today.getDay(); var Date = today.getDate(); var Mnth = today.getMonth(); var Hrs = today.getHours(); var Mins = today.getMinutes(); var DTswitch = 11; var DayNam = new Array( "星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"); var MnthNam = new Array( "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"); var Date = Date + "日" if (Hrs < 10) {Hrs = "0" + Hrs;} if (Mins < 10) {Mins = "0" + Mins;} var DateIt = "今天是:"+MnthNam[Mnth] + " " + Date + " " +DayNam[today.getDay()]; var TimeIt = Hrs+":"+Mins; if (DTswitch == 11) {var DateTime = DateIt + " " + TimeIt+" 分";} if (DTswitch == 10) {var DateTime = DateIt;} if (DTswitch == 01) {var DateTime = TimeIt+" 分";} document.onload=window.status=DateTime; // End --> </script>
var DTswitch = 11;是定义的一个什么东西?本人刚学,不懂?
|