如何计算您的精彩人生呢?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><TITLE>计算您的精彩人生</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR></HEAD>
<BODY onload=showtime() background="temp.JPG"><BR><BR>
<script language="javascript">
var biryear = prompt('请输入你的出生年份','1980');
var birmonth = prompt('请输入你的出生月份','5');
var birday = prompt('请输入你的出生日','30');
var year = new Date();
var getyear = year.getYear();
TMonth = new Array('Jan','Feb','Mar','Apr','May','June','July','Aug','Sep','Oct','Nov','Dec');
nowMonth = birmonth - 1;
bmonth = TMonth[nowMonth];
var timerid;
var timerRunning = false;
var today = new Date();
var startday = new Date();
var enday = new Date();
var minPerDay = 0;
var secsLeft = 0;
var secsRound = 0;
var secsRemain = 0;
var minLeft = 0;
var minRound = 0;
var minRemain = 0;
var timeRemain = 0;
function showtime()
{
startday = new Date(""+bmonth+" "+birday+", "+biryear+" 00:00 EDT");
startday.setYear(""+biryear+"");
today = new Date();
secsPerDay = 1000 ;
minPerDay = 60 * 1000 ;
hoursPerDay = 60 * 60 * 1000;
PerDay = 24 * 60 * 60 * 1000;
secsLeft = (today.getTime() - startday.getTime()) / minPerDay;
secsRound = Math.round(secsLeft);
secsRemain = secsLeft - secsRound;
secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60;
secsRemain = Math.round(secsRemain);
minLeft = ((today.getTime() - startday.getTime()) / hoursPerDay);
minRound = Math.round(minLeft);
minRemain = minLeft - minRound;
minRemain = (minRemain < 0) ? minRemain = 60 - ((minRound - minLeft) * 60) : minRemain = ((minLeft - minRound) * 60);
minRemain = Math.round(minRemain - 0.495);
hoursLeft = ((today.getTime() - startday.getTime()) / PerDay);
hoursRound = Math.round(hoursLeft);
hoursRemain = hoursLeft - hoursRound;
hoursRemain = (hoursRemain < 0) ? hoursRemain = 24 - ((hoursRound - hoursLeft) * 24) : hoursRemain = ((hoursLeft - hoursRound) * 24);
hoursRemain = Math.round(hoursRemain - 0.5);
daysLeft = ((today.getTime() - startday.getTime()) / PerDay);
daysLeft = (daysLeft - 0.5);
daysRound = Math.round(daysLeft);
daysRemain = daysRound;
day_rem = " 天 >>> "
hour_rem = " 小时 >>> "
min_rem = " 分 >>> "
sec_rem = " 秒"
timeRemain = daysRemain + day_rem + hoursRemain + hour_rem + minRemain + min_rem + secsRemain + sec_rem;
document.up.face.value = timeRemain;
timerid = setTimeout("showtime()",1000);
timerRunning = true;
}
</SCRIPT>
</P>
<table width="400" height="50" border="1" align="center" cellpadding="4" cellspacing="3" bordercolor="#CCCCCC" bgcolor="#CCFF00">
<tr>
<td align="center" valign="middle" bgcolor="#FFFFFF" background="temp.bmp">
<FORM name=up onsubmit=1>
<font size="5" color="#9966CC" face="华文行楷">从你出生到目前为止,你已度过了</font>
<p>
<INPUT size=46 value="计算出您的精彩人生!" name= "face">
</FORM>
</td>
</tr>
</table>
</BODY>
</HTML>