📄 流年似水.txt
字号:
先将下列代码复制到<head></head>之间:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!-- hide this script tag's contents from old browsers
function lifetimer(){
today = new Date()
BirthDay = new Date(document.live.age.value)
timeold = (today.getTime() - BirthDay.getTime());
sectimeold = timeold / 1000;
secondsold = Math.floor(sectimeold);
msPerDay = 24 * 60 * 60 * 1000 ;
timeold = (today.getTime() - BirthDay.getTime());
e_daysold = timeold / msPerDay;
daysold = Math.floor(e_daysold);
e_hrsold = (e_daysold - daysold)*24;
hrsold = Math.floor(e_hrsold);
minsold = Math.floor((e_hrsold - hrsold)*60);
document.live.time1.value = daysold
document.live.time2.value = hrsold
document.live.time3.value = minsold
window.status = "你已生存了" + secondsold + "............ 秒了。";
timerID = setTimeout("lifetimer()",1000)
}
// -- done hiding from old browsers -->
</script>
再将下列代码复制到<body></body>之间:
<center>
<h2><font face="楷体_GB2312" size="5" color="#0000FF">似水流年</font></h2>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!-- hide this script tag's contents from old browsers
var today = new Date()
dayStr = today.toLocaleString();
document.write("<b>当前时间:");
document.write(dayStr);
document.write("</b>");
// -- done hiding from old browsers -->
</script>
<br><br><br>
<form name="live">
<font color="#808000">输入你的生日:</font><INPUT TYPE="text" NAME="age" VALUE="" SIZE=20>
<font color="#808000">例子: </font> (november 1,1966) <br><br><br>
<INPUT TYPE="button" NAME="start" VALUE="Start Timer" ONCLICK="lifetimer(this.form)">
<INPUT TYPE="reset" NAME="resetb" VALUE="Reset Age">
<br><br>
<table border=0>
<tr><td><font color="#808000"><b>你已生存的天数:</b></font></td>
<td>
<INPUT TYPE="text" NAME="time1" VALUE="" size=8>
</td>
</tr>
<tr><td><b><font color="#808000">距你死亡的年数:</font></b></td>
<td>
<INPUT TYPE="password" NAME="time2" VALUE="" size=8>
</td>
</tr>
<tr><td><b><font color="#808000">两者相差的年数:</font></b></td>
<td><INPUT TYPE="password" NAME="time3" VALUE="" size=8></td>
</tr>
</table>
</form>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -