반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- #db#froup#by
- #자바스크립트#만년달력#달력
- #자바스크립트#회원가입#유효성#검사
- #select#from#distinct
- #alert#자바스크립트#radio#check
- #jQuery#mouse#over
- #C언어#성적처리#점수#등급
- #C언어#scanf#fflush
- #C언어#do#while#계산기
- #C언어#switch#case#계산기#함수
- #자바스크립트#시계#실시간시계
- #html#프레임
- #C언어#if
- #C언어#do#while#계산기#함수
- #getElementById#id
- #자바스크립트#alert
- #db#join#inner#cross
- #자바스크립트#텍스트#알람#alert
- #db#order#by
- #C언어#숫자비교#삼항연산자
- #C언어#타입#printf
- #C언어#for#간단#예제
- #db#where
- #클릭#숨기기#보이기
- #C언어#사각형
- #자바스크립트#접속시간#시간
- #db#데이터베이스#select
- #html#테이블#table
- #alert#자바스크립트#checkbox#alert
- #증감#연산자
Archives
- Today
- Total
선택장애
자바스크립트 - 접속시간 띄우기 본문
반응형
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
<style type="text/css">
.clock{
font-family:tahoma;
font-size:240pt;
color:#006699;
}
</style>
<script language = "javascript">
var conntectedDate = new Date();
function showElapsedTime()
{
var divClock = document.getElementById("divClock");
var currentDate = new Date();
var result = Math.cell((currentDate - connectedDate) / 1000);
divClock.innerText = "이 페이지에 접속 후" + result;
divClock.innerText += "초가 지났습니다.;
setTimeout(showElapsedTime, 1000);
}
</script>
</head>
<body onload="showElapsedTime()">
<div id = "divClock" class="clock"> </div>
</body>
</html>
반응형
'자바스크립트' 카테고리의 다른 글
자바스크립트 - 텍스트값입력받아 알람띄우기(alert) (0) | 2017.08.14 |
---|---|
자바스크립트 - 실시간시계 (0) | 2017.08.14 |
자바스크립트 - 체크박스값 받아서 알람띄우기(alert) (0) | 2017.08.14 |
자바스크립트 - 라디오버튼 체크한거 알람띄우기(alert) (0) | 2017.08.14 |
자바스크립트 - if else문 알람창(alert) (0) | 2017.08.14 |