홈에 머무른 시간 표시 > JAVA Tip

본문 바로가기
사이트 내 전체검색

JAVA Tip

홈에 머무른 시간 표시

페이지 정보

본문

<html>
<head>
<SCRIPT language=JavaScript>
function startTimer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
enterTime=hours*3600+mins*60+secs;
Timer();
}
 
function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
timeSpent();
}

function timeSpent(){
count = curTime - enterTime;
if (count > 3600)
hour = parseInt(count/3600);
else
hour = 0
 
if (count > 60)
min = parseInt(count/60);
else
min = 0
if (min < 10)
min = "0" + min

sec = parseInt(count - min*60)
if (sec < 0)
sec = "0" + sec
document.timer.counter.value = hour + ":" + min + ":" + sec
window.setTimeout("Timer()",1000)
}

</SCRIPT>
</head>
<body>
<body onload="startTimer();">

<form name="timer" method="get">
손님이 오신지 <input type="text" name="counter" size="9" style="border-style:none;">지났습니다.
</form>
</body>
</html>

댓글목록

등록된 댓글이 없습니다.

Total 101건 3 페이지
JAVA Tip 목록
번호 제목 글쓴이 조회 날짜
69 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3117 07-08
68 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1764 07-08
67 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2121 07-08
66 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1476 07-08
65 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1503 07-08
64 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1748 07-08
63 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1745 07-08
62 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2874 07-08
61 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1769 07-02
60 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 3362 07-01
59 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2934 06-29
58 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1586 06-29
57 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2940 06-29
56 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 2982 06-29
55 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1300 06-29
열람중 no_profile 이즈쪽지보내기 자기소개 아이디로 검색 전체게시물 1385 06-29

검색

회원로그인

회원가입

사이트 정보

컴퓨터 정보,윈도우즈,리눅스,포토샵,3ds
맥스,프로그래밍 강좌팁

접속자집계

오늘
365
어제
324
최대
5,287
전체
629,912
Copyright © www.qdata.co.kr All rights reserved.