<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년 전
감사합니다. 잘 쓰겠습니다.
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7530 | 10년 전 | 817 | ||
| 7529 |
파랑새1597
|
10년 전 | 1235 | |
| 7528 |
파랑새1597
|
10년 전 | 1328 | |
| 7527 |
integrity7
|
10년 전 | 1409 | |
| 7526 | 10년 전 | 2436 | ||
| 7525 |
다빈치코드777
|
10년 전 | 1119 | |
| 7524 | 10년 전 | 1588 | ||
| 7523 | 10년 전 | 976 | ||
| 7522 |
|
10년 전 | 1007 | |
| 7521 |
blackkil
|
10년 전 | 1890 | |
| 7520 | 10년 전 | 1307 | ||
| 7519 |
Gaumi
|
10년 전 | 1091 | |
| 7518 | 10년 전 | 1501 | ||
| 7517 | 10년 전 | 841 | ||
| 7516 | 10년 전 | 1310 | ||
| 7515 | 10년 전 | 1423 | ||
| 7514 |
|
10년 전 | 4498 | |
| 7513 |
멋진남자임
|
10년 전 | 1139 | |
| 7512 |
다빈치코드777
|
10년 전 | 885 | |
| 7511 |
|
10년 전 | 3415 | |
| 7510 | 10년 전 | 1380 | ||
| 7509 | 10년 전 | 1156 | ||
| 7508 | 10년 전 | 724 | ||
| 7507 |
senseme
|
10년 전 | 762 | |
| 7506 |
멋진남자임
|
10년 전 | 1659 | |
| 7505 | 10년 전 | 4035 | ||
| 7504 | 10년 전 | 2165 | ||
| 7503 | 10년 전 | 1005 | ||
| 7502 | 10년 전 | 529 | ||
| 7501 | 10년 전 | 1455 | ||
| 7500 | 10년 전 | 1504 | ||
| 7499 | 10년 전 | 3409 | ||
| 7498 | 10년 전 | 1243 | ||
| 7497 |
dethos79
|
10년 전 | 2972 | |
| 7496 | 10년 전 | 2179 | ||
| 7495 | 10년 전 | 905 | ||
| 7494 |
CHAVO
|
10년 전 | 1151 | |
| 7493 | 10년 전 | 2663 | ||
| 7492 | 10년 전 | 1293 | ||
| 7491 | 10년 전 | 1503 | ||
| 7490 | 10년 전 | 2353 | ||
| 7489 | 10년 전 | 2130 | ||
| 7488 |
toptopon
|
10년 전 | 908 | |
| 7487 |
|
10년 전 | 1052 | |
| 7486 | 10년 전 | 3371 | ||
| 7485 | 10년 전 | 1330 | ||
| 7484 | 10년 전 | 1383 | ||
| 7483 | 10년 전 | 1042 | ||
| 7482 | 10년 전 | 673 | ||
| 7481 | 10년 전 | 866 | ||
| 7480 | 10년 전 | 1245 | ||
| 7479 | 10년 전 | 2619 | ||
| 7478 | 10년 전 | 1182 | ||
| 7477 |
멋진남자임
|
10년 전 | 1533 | |
| 7476 |
zeppeto
|
10년 전 | 1150 | |
| 7475 |
200점아빠
|
10년 전 | 925 | |
| 7474 | 10년 전 | 4016 | ||
| 7473 | 10년 전 | 1007 | ||
| 7472 |
나르시스1
|
10년 전 | 1257 | |
| 7471 | 10년 전 | 885 | ||
| 7470 | 10년 전 | 1304 | ||
| 7469 |
플라이SINJI
|
10년 전 | 1005 | |
| 7468 |
|
10년 전 | 570 | |
| 7467 |
|
10년 전 | 683 | |
| 7466 | 10년 전 | 1141 | ||
| 7465 | 10년 전 | 1199 | ||
| 7464 |
|
10년 전 | 1212 | |
| 7463 | 10년 전 | 1275 | ||
| 7462 |
진짜별사탕
|
10년 전 | 880 | |
| 7461 | 10년 전 | 964 | ||
| 7460 | 10년 전 | 3756 | ||
| 7459 |
멋진남자임
|
10년 전 | 1570 | |
| 7458 |
멋진남자임
|
10년 전 | 498 | |
| 7457 | 10년 전 | 931 | ||
| 7456 | 10년 전 | 777 | ||
| 7455 | 10년 전 | 2184 | ||
| 7454 | 10년 전 | 643 | ||
| 7453 | 10년 전 | 848 | ||
| 7452 |
중국어사이트제작
|
10년 전 | 514 | |
| 7451 | 10년 전 | 920 | ||
| 7450 | 10년 전 | 643 | ||
| 7449 |
울라라라우
|
10년 전 | 961 | |
| 7448 | 10년 전 | 1641 | ||
| 7447 |
멋진남자임
|
10년 전 | 520 | |
| 7446 | 10년 전 | 564 | ||
| 7445 |
네이비칼라
|
10년 전 | 1695 | |
| 7444 |
senseme
|
10년 전 | 1418 | |
| 7443 | 10년 전 | 1353 | ||
| 7442 | 10년 전 | 738 | ||
| 7441 |
멋진남자임
|
10년 전 | 1455 | |
| 7440 | 10년 전 | 925 | ||
| 7439 |
|
11년 전 | 781 | |
| 7438 |
|
11년 전 | 954 | |
| 7437 |
basement
|
11년 전 | 1049 | |
| 7436 |
잘살아보자
|
11년 전 | 1145 | |
| 7435 | 11년 전 | 1098 | ||
| 7434 | 11년 전 | 3800 | ||
| 7433 |
|
11년 전 | 2762 | |
| 7432 |
alexkim
|
11년 전 | 873 | |
| 7431 |
이웃집초보
|
11년 전 | 1324 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기