<html> <head> <script type="text/javascript"> <!-- function time() { var now = new Date(); var hour = 23-now.getHours(); var min = 59-now.getMinutes(); var sec = 59-now.getSeconds(); document.getElementById("ptime").innerHTML = ""+hour+"時間"+min+"分"+sec+"秒"; window.setTimeout("time()", 500); } // --> </script> </head> <body onload="time()"> <div id="ptime"></div> </body> </html>