<HEAD>
<TITLE>test</TITLE>
<SCRIPT language=JavaScript>
function timeClock() {
day = new Date( )
hru = day.getHours( )
miu = day.getMinutes( )
mi = miu/60
hr = hru+mi
if (( hr >= 0 ) &&(hr <1.5 ))tim="0"
if (( hr >= 1.5 ) &&(hr <3 ))tim="-64"
if (( hr >= 3 ) &&(hr <4.5 ))tim="-128"
if (( hr >= 4.5 ) &&(hr <6 ))tim="-192"
if (( hr >= 6 ) &&(hr <7.5 ))tim="-256"
if (( hr >= 7.5 ) &&(hr <9 ))tim="-320"
if (( hr >= 9 ) &&(hr <10.5 ))tim="-384"
if (( hr >= 10.5 ) &&(hr <12 ))tim="-448"
if (( hr >= 12 ) &&(hr <13.5 ))tim="-512"
if (( hr >= 13.5 ) &&(hr <15 ))tim="-576"
if (( hr >= 15 ) &&(hr <16.5 ))tim="-640"
if (( hr >= 16.5 ) &&(hr <18 ))tim="-704"
if (( hr >= 18 ) &&(hr <19.5 ))tim="-768"
if (( hr >= 19.5 ) &&(hr <21 ))tim="-832"
if (( hr >= 21 ) &&(hr <22.5 ))tim="-896"
if (( hr >= 22.5 ) &&(hr <24 ))tim="-960"
document.clock.time.value = tim
}
setInterval("timeClock()", 1000)// 循环定时调用
</SCRIPT>
</HEAD>
<BODY onLoad="timeClock()">
<FORM name=clock>
Time:<INPUT type=text name=time size=8 value=""><BR>
</FORM>
</BODY>
</HTML>
重启完成后会出现下图所示
将这两项都设置成
勾选
勾选
设置完成后js,css,html即可实现自动更新