JavaScriptソース |
---|
<html> <head> <title>現在時刻をステータス行に表示する</title> <meta http-equiv="content-type" content="text/html;charset=shift_jis"> <script language="JavaScript"> <!-- timeID = 10; function Times() { ct = new Date(); h = ct.getHours(); m = ct.getMinutes(); s = ct.getSeconds(); window.status = "現在の時間は、"+h+"時"+m+"分"+s+"秒"; clearTimeout(timeID); timeID = setTimeout("Times()",500); } // --> </script> </head> <body onload="Times()"> </body> </html> |