<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html><head><title>同学生日提醒</title>
<style type=text/css>body {
font-family: "宋体"; font-size: 9pt; margin-left: 0px; margin-right: 0px; margin-top: 0px
}
a {
color: black; font-size: 9pt; font-weight: 400; text-decoration: none
}
a:hover {
color: red; font-size: 9pt; font-weight: 400; text-decoration: underline
}
a:active {
color: #ff0033; cursor: hand; font: 9pt "宋体"
}
</style>
<meta content="text/html; charset=gb2312" http-equiv=content-type>
<script language=javascript>
<!–
function birthday(year,month,date,person) {
this.year=year
this.month=month
this.date=date
this.person=person
}
function birthdaylist() {
}
blist=new birthdaylist()
blist[0]= new birthday(1933,2,14,"abc")
blist[1]= new birthday(1933,12,17,"efs")
//上面添加你朋友的生日列表
var now=new date()
today=new date(now.getyear(),now.getmonth(),now.getdate()) // today 0:00:00
function daysfromtoday(sdate) {
return math.round((sdate.gettime()-today.gettime())/(24*60*60*1000))
}
function writenextbirthday(list) {
var daystoclosest=888
var closest
for (var i in list) {
thisdate=new date(today.getyear(),list[i].month-1,list[i].date)
if (daysfromtoday(thisdate)<0)
thisdate.setyear(today.getyear()+1)
if (daysfromtoday(thisdate)<daystoclosest) {
daystoclosest=daysfromtoday(thisdate)
closest=i
}
}
if (daystoclosest==0)
document.write("<b>今天["+list[closest].person+"]"+"["+(today.getyear()-list[closest].year)+"]岁大寿!
祝你生日快乐^0^</b>")
else if (daystoclosest==1)
document.write("明天["+list[closest].person+"]将过["+(today.getyear()-list[closest].year)+"]岁生日!")
else
document.write("你最近要过生日的朋友是["+list[closest].person+"]在["+daystoclosest+"]天后。")
}
// end hiding –>
</script>
<meta content="mshtml 5.00.2614.3500" name=generator></head>
<body onload="startclock ()" bgcolor=#ffffff>
<center>
<font color="red"><font color="#ff3333" size="5">同学生日提醒</font></font><font color=red face=隶书
size=6><br>
</font> <font color=red face=隶书 size=6> </font>
</center>
<div align="center">
<hr size="1" color="#000000" noshade>
现在的日期时间是:
<script language=javascript>
today=new date();
function initarray(){
this.length=initarray.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=initarray.arguments[i] }
var d=new initarray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
document.write(
"<font color=##000000 style=font-size:9pt;font-family: 宋体> ",
today.getyear(),"年",
today.getmonth()+1,"月",
today.getdate(),"日",
d[today.getday()+1],
"</font>" );
</script>
<br>
<br>
</div>
<center>
<table width="502" border="1" cellspacing="0" cellpadding="0" bordercolordark="#ffffff"
bordercolor="#000000">
<tr bgcolor="#ccffcc">
<td>
<div align="center"><font color="#ff3333"></font><font color="#ff3333" size="4">大
家 注 意 了</font></div>
</td>
</tr>
<tr>
<td>
<div align="center">
<script language=javascript>
<!–
writenextbirthday(blist)
// –>
</script>
</div>
</td>
</tr>
</table>
<br>
—97计算机—
</center>
</body></html>
