<html>
<head>
<script language="JavaScript">
<!--
function init_clock()
{
var type, i, top, obj, clocks;
clocks = new Array();
for (i = 0, top = 0; i < init_clock.arguments.length; i += 2) {
obj = eval('document.'+init_clock.arguments[i]);
if (obj == null) continue;
if ((type = init_clock.arguments[i+1]) < 1 && 11 < type) continue;
clocks[top++] = obj;
clocks[top++] = type;
}
clocks.months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July',
'August', 'September', 'October', 'November', 'December');
clocks.days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday');
clocks.k_days = new Array('일', '월', '화', '수', '목', '금', '토');
clocks.ampm_str = new Array('AM', 'PM');
clocks.k_ampm_str = new Array('오전', '오후');
if (top > 0) {
document.clocks = clocks;
clock();
}
}
function clock()
{
var i, type, clocks, next_call, str, hour, ampm, now, year2, year4;
clocks = document.clocks;
if (clocks == null) return;
next_call = false;
for (i = 0; i < clocks.length; i += 2) {
obj = clocks[i];
type = clocks[i+1];
now = new Date();
year2 = now.getYear();
year4 = year2;
if (year2 < 1000) year4 = 1900 + year2;
if (year2 >= 100) year2 = year4;
if (type == 1 || type == 2) {
obj.value = clocks.months[now.getMonth()] + ' ' + now.getDate() + ', ' + year4;
if (type == 2)
obj.value = clocks.days[now.getDay()] + ', ' + obj.value;
} else if (type == 3 || type == 4) {
obj.value = year2 + '/' + (now.getMonth()+1) + '/' + now.getDate();
} else if (type == 5 || type == 6) {
obj.value = now.getDate() + '/' + (now.getMonth()+1) + '/' + year2;
} else if (type == 8 || type == 9 || type == 10 || type == 11) {
obj.value = year4 + '년 ' + (now.getMonth()+1) + '월 ' + now.getDate() + '일';
if (type == 9)
obj.value += ' ' + clocks.k_days[now.getDay()] + '요일';
}
if (type == 4 || type == 6 || type == 7 || type == 10 || type == 11) {
hour = now.getHours();
ampm = 0;
if (hour >= 12) {
if (hour > 12) hour -= 12;
ampm = 1;
}
if (type == 10 || type == 11) {
str = clocks.k_ampm_str[ampm] +' '+ hour+'시 '+ now.getMinutes() +'분';
if (type == 11) str += ' ' + now.getSeconds() +'초';
} else {
str = hour +':'+ ((now.getMinutes() < 10) ? '0'+now.getMinutes():now.getMinutes()) +':'+ ((now.getSeconds() < 10) ? '0'+now.getSeconds():now.getSeconds()) +' '+ clocks.ampm_str[ampm];
}
if (type == 7) obj.value = str;
else obj.value += ' ' + str;
}
if (type == 4 || type == 6 || type == 7 || type == 10 || type == 11)
next_call = true;
}
if (next_call)
window.setTimeout("clock();", 1000);
}
// -->
</script>
</head>
<body OnLoad="init_clock('mclock.textclock1', 11);">
아래 init_clock('form1.textclock1', 11) 함수의 밑줄친 부분의 숫자를 바꾸면 다양한 효과를 줄 수 있습니다.
<!--
init_clock(mclock.textclock1', 11) 함수의 밑줄친 부분의 숫자를 바꾸면 다음과 같은 효과를 줄 수 있습니다.
1 : December 4, 2000
2 : Tuesday, December 4, 2000
3 : 2000/12/4
4 : 2000/12/4 1:49:46 PM
5 : 4/12/2000
6 : 4/12/2000 1:50:40 PM
7 : 1:50:58 PM
8 : 2000년 12월 4일
9 : 2000년 12월 4일 화요일
10 : 2000년 12월 4일 오후 1시 51분
11 : 2000년 12월 4일 오후 1시 52분 6초
-->
<form name="mclock">
<input type="text" name="textclock1" size="30" style="border-style:none;">
</form>
</body>
</html><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]</div>
<head>
<script language="JavaScript">
<!--
function init_clock()
{
var type, i, top, obj, clocks;
clocks = new Array();
for (i = 0, top = 0; i < init_clock.arguments.length; i += 2) {
obj = eval('document.'+init_clock.arguments[i]);
if (obj == null) continue;
if ((type = init_clock.arguments[i+1]) < 1 && 11 < type) continue;
clocks[top++] = obj;
clocks[top++] = type;
}
clocks.months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July',
'August', 'September', 'October', 'November', 'December');
clocks.days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday');
clocks.k_days = new Array('일', '월', '화', '수', '목', '금', '토');
clocks.ampm_str = new Array('AM', 'PM');
clocks.k_ampm_str = new Array('오전', '오후');
if (top > 0) {
document.clocks = clocks;
clock();
}
}
function clock()
{
var i, type, clocks, next_call, str, hour, ampm, now, year2, year4;
clocks = document.clocks;
if (clocks == null) return;
next_call = false;
for (i = 0; i < clocks.length; i += 2) {
obj = clocks[i];
type = clocks[i+1];
now = new Date();
year2 = now.getYear();
year4 = year2;
if (year2 < 1000) year4 = 1900 + year2;
if (year2 >= 100) year2 = year4;
if (type == 1 || type == 2) {
obj.value = clocks.months[now.getMonth()] + ' ' + now.getDate() + ', ' + year4;
if (type == 2)
obj.value = clocks.days[now.getDay()] + ', ' + obj.value;
} else if (type == 3 || type == 4) {
obj.value = year2 + '/' + (now.getMonth()+1) + '/' + now.getDate();
} else if (type == 5 || type == 6) {
obj.value = now.getDate() + '/' + (now.getMonth()+1) + '/' + year2;
} else if (type == 8 || type == 9 || type == 10 || type == 11) {
obj.value = year4 + '년 ' + (now.getMonth()+1) + '월 ' + now.getDate() + '일';
if (type == 9)
obj.value += ' ' + clocks.k_days[now.getDay()] + '요일';
}
if (type == 4 || type == 6 || type == 7 || type == 10 || type == 11) {
hour = now.getHours();
ampm = 0;
if (hour >= 12) {
if (hour > 12) hour -= 12;
ampm = 1;
}
if (type == 10 || type == 11) {
str = clocks.k_ampm_str[ampm] +' '+ hour+'시 '+ now.getMinutes() +'분';
if (type == 11) str += ' ' + now.getSeconds() +'초';
} else {
str = hour +':'+ ((now.getMinutes() < 10) ? '0'+now.getMinutes():now.getMinutes()) +':'+ ((now.getSeconds() < 10) ? '0'+now.getSeconds():now.getSeconds()) +' '+ clocks.ampm_str[ampm];
}
if (type == 7) obj.value = str;
else obj.value += ' ' + str;
}
if (type == 4 || type == 6 || type == 7 || type == 10 || type == 11)
next_call = true;
}
if (next_call)
window.setTimeout("clock();", 1000);
}
// -->
</script>
</head>
<body OnLoad="init_clock('mclock.textclock1', 11);">
아래 init_clock('form1.textclock1', 11) 함수의 밑줄친 부분의 숫자를 바꾸면 다양한 효과를 줄 수 있습니다.
<!--
init_clock(mclock.textclock1', 11) 함수의 밑줄친 부분의 숫자를 바꾸면 다음과 같은 효과를 줄 수 있습니다.
1 : December 4, 2000
2 : Tuesday, December 4, 2000
3 : 2000/12/4
4 : 2000/12/4 1:49:46 PM
5 : 4/12/2000
6 : 4/12/2000 1:50:40 PM
7 : 1:50:58 PM
8 : 2000년 12월 4일
9 : 2000년 12월 4일 화요일
10 : 2000년 12월 4일 오후 1시 51분
11 : 2000년 12월 4일 오후 1시 52분 6초
-->
<form name="mclock">
<input type="text" name="textclock1" size="30" style="border-style:none;">
</form>
</body>
</html><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]</div>
댓글 3개
Photofly
19년 전
좋네요...감사합니다...^^
19년 전
감사~~
18년 전
감사합니다. 잘 쓰겠습니다.
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8130 | 9년 전 | 458 | ||
| 8129 |
|
9년 전 | 625 | |
| 8128 | 9년 전 | 494 | ||
| 8127 |
|
9년 전 | 554 | |
| 8126 | 9년 전 | 486 | ||
| 8125 | 9년 전 | 747 | ||
| 8124 |
|
9년 전 | 473 | |
| 8123 | 9년 전 | 463 | ||
| 8122 | 9년 전 | 398 | ||
| 8121 | 9년 전 | 508 | ||
| 8120 | 9년 전 | 440 | ||
| 8119 | 9년 전 | 515 | ||
| 8118 |
|
9년 전 | 603 | |
| 8117 |
|
9년 전 | 378 | |
| 8116 |
PASKRAN
|
9년 전 | 448 | |
| 8115 | 9년 전 | 438 | ||
| 8114 |
kiplayer
|
9년 전 | 577 | |
| 8113 | 9년 전 | 407 | ||
| 8112 |
|
9년 전 | 525 | |
| 8111 | 9년 전 | 377 | ||
| 8110 | 9년 전 | 420 | ||
| 8109 | 9년 전 | 332 | ||
| 8108 |
|
9년 전 | 517 | |
| 8107 |
|
9년 전 | 410 | |
| 8106 |
|
9년 전 | 408 | |
| 8105 | 9년 전 | 451 | ||
| 8104 |
|
9년 전 | 405 | |
| 8103 |
|
9년 전 | 406 | |
| 8102 |
|
9년 전 | 356 | |
| 8101 |
snshero
|
9년 전 | 747 | |
| 8100 | 9년 전 | 812 | ||
| 8099 | 9년 전 | 779 | ||
| 8098 | 9년 전 | 691 | ||
| 8097 | 9년 전 | 481 | ||
| 8096 | 9년 전 | 677 | ||
| 8095 | 9년 전 | 794 | ||
| 8094 | 9년 전 | 473 | ||
| 8093 | 9년 전 | 769 | ||
| 8092 | 9년 전 | 729 | ||
| 8091 | 9년 전 | 1126 | ||
| 8090 | 9년 전 | 732 | ||
| 8089 | 9년 전 | 937 | ||
| 8088 | 9년 전 | 614 | ||
| 8087 | 9년 전 | 718 | ||
| 8086 | 9년 전 | 493 | ||
| 8085 | 9년 전 | 454 | ||
| 8084 | 9년 전 | 594 | ||
| 8083 | 9년 전 | 567 | ||
| 8082 | 9년 전 | 730 | ||
| 8081 | 9년 전 | 443 | ||
| 8080 | 9년 전 | 531 | ||
| 8079 | 9년 전 | 484 | ||
| 8078 | 9년 전 | 418 | ||
| 8077 | 9년 전 | 494 | ||
| 8076 | 9년 전 | 379 | ||
| 8075 | 9년 전 | 396 | ||
| 8074 | 9년 전 | 361 | ||
| 8073 | 9년 전 | 413 | ||
| 8072 | 9년 전 | 402 | ||
| 8071 |
o1o111
|
9년 전 | 849 | |
| 8070 | 9년 전 | 369 | ||
| 8069 | 9년 전 | 300 | ||
| 8068 | 9년 전 | 563 | ||
| 8067 | 9년 전 | 372 | ||
| 8066 | 9년 전 | 398 | ||
| 8065 | 9년 전 | 351 | ||
| 8064 | 9년 전 | 327 | ||
| 8063 | 9년 전 | 291 | ||
| 8062 | 9년 전 | 277 | ||
| 8061 | 9년 전 | 326 | ||
| 8060 | 9년 전 | 347 | ||
| 8059 | 9년 전 | 280 | ||
| 8058 | 9년 전 | 221 | ||
| 8057 | 9년 전 | 343 | ||
| 8056 | 9년 전 | 277 | ||
| 8055 | 9년 전 | 307 | ||
| 8054 | 9년 전 | 326 | ||
| 8053 | 9년 전 | 369 | ||
| 8052 | 9년 전 | 257 | ||
| 8051 | 9년 전 | 298 | ||
| 8050 | 9년 전 | 364 | ||
| 8049 | 9년 전 | 285 | ||
| 8048 | 9년 전 | 401 | ||
| 8047 | 9년 전 | 333 | ||
| 8046 | 9년 전 | 262 | ||
| 8045 | 9년 전 | 234 | ||
| 8044 | 9년 전 | 293 | ||
| 8043 | 9년 전 | 239 | ||
| 8042 | 9년 전 | 266 | ||
| 8041 | 9년 전 | 302 | ||
| 8040 | 9년 전 | 235 | ||
| 8039 | 9년 전 | 293 | ||
| 8038 | 9년 전 | 250 | ||
| 8037 | 9년 전 | 362 | ||
| 8036 | 9년 전 | 448 | ||
| 8035 | 9년 전 | 400 | ||
| 8034 | 9년 전 | 362 | ||
| 8033 | 9년 전 | 315 | ||
| 8032 | 9년 전 | 369 | ||
| 8031 | 9년 전 | 304 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기