todayDate = new Date(); date = todayDate.getDate(); month= todayDate.getMonth()+1; year= todayDate.getYear(); document.write("今天是") document.write(" ") document.write(year); document.write("年"); document.write(month); document.write("月"); document.write(date); document.write("日"); document.write(" ") if (todayDate.getDay() == 5) document.write("星期五") if (todayDate.getDay() == 6) document.write("星期六") if (todayDate.getDay() == 0) document.write("星期日") if (todayDate.getDay() == 1) document.write("星期一") if (todayDate.getDay() == 2) document.write("星期二") if (todayDate.getDay() == 3) document.write("星期三") if (todayDate.getDay() == 4) document.write("星期四") var symbol="邓丽君逝世15周年"; var deadline= new Date("5/8/2010"); var now = new Date(); var leave = deadline.getTime() - now.getTime(); var day = Math.floor(leave / (1000 * 60 * 60 * 24)); document.write("") if (day > 0) document.write(" 离"+ symbol+"还有"+day +"天!") else if (day == 0) document.write("明天就是"+symbol+"啦!") else if (day == -1) document.write("今天就是"+symbol+"呀!") else document.write("唉呀!"+symbol+"已经过了!");