<head>와 </head>부분에 넣어줍니다. ***************************************** <script language="JavaScript"> <!-- var flasher = false function updateTime() { var now = new Date() var theHour = now.getHours() var theMin = now.getMinutes() var theSec = now.getSeconds() var theTime = "" + ((theHour > 12) ? theHour - 12 : theHour) theTime += ((theMin < 10) ? ":0" : ":") + theMin theTime += ((theSec < 10) ? ":0" : ":") + theSec theTime += (theHour >= 12) ? " ㏘" : " ㏂" window.status = "현재 시간은 : " + theTime timerID = setTimeout("updateTime()",1000) } //--> </script> <body>와 </body>부분에 넣어줍니다. ***************************************** <body onload="updateTime()"> |
카테고리 없음