페이지 로드후 머문시간 분과 초만 나타내기
인터넷정보2007. 10. 17. 18:09
<html> <head> <title> </title> </head> <body> <style type='text/css'> <!-- .text { COLOR: red; FONT-FAMILY: 굴림; FONT-SIZE: 9pt; } --> </style> <SCRIPT LANGUAGE="JavaScript"> <!-- startday = new Date(); clockStart = startday.getTime(); function initStopwatch() { var myTime = new Date(); return((myTime.getTime() - clockStart)/1000); } function getSecs() { var tSecs = Math.round(initStopwatch()); var iSecs = tSecs % 60; var iMins = Math.round((tSecs-30)/60); var sSecs ="" + ((iSecs > 9) ? iSecs : "0" + iSecs); var sMins ="" + ((iMins > 9) ? iMins : "0" + iMins); time.innerHTML = sMins+":"+sSecs; window.setTimeout('getSecs()',1000); } //--> </script> <BODY onLoad="window.setTimeout('getSecs()',1);"> <div id="time" class="text"></div> </body> </html> |
'인터넷정보' 카테고리의 다른 글
일정 기간 동안 하루에 한번 팝업창 띄우기 (0) | 2007.10.17 |
---|---|
특정 키보드키 제어하기 (0) | 2007.10.17 |
파일 용량 계산 (Gb / Mb / Kb / Bytes) (0) | 2007.10.17 |
이미지 시간 지정해서 다른 이미지로 바뀜 (0) | 2007.10.17 |
gray 컬러 모음 - 색상표, 컬러 코드 (0) | 2007.10.17 |
시간대별 다른 이미지 나타나게.. (0) | 2007.10.17 |
시간대별 다른 메세지 출력하기 (0) | 2007.10.17 |
다음카페 배경음악 플레이어 삽입하기 (시노부 bgm등....) (0) | 2007.10.17 |
키코드 값 - key code (0) | 2007.10.17 |
문서없이 새창 띄우기 (0) | 2007.10.17 |