<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년 전
감사합니다. 잘 쓰겠습니다.
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8230 | 9년 전 | 60 | ||
| 8229 | 9년 전 | 61 | ||
| 8228 |
커네드커네드
|
9년 전 | 107 | |
| 8227 | 9년 전 | 114 | ||
| 8226 | 9년 전 | 154 | ||
| 8225 | 9년 전 | 141 | ||
| 8224 | 9년 전 | 140 | ||
| 8223 | 9년 전 | 109 | ||
| 8222 |
|
9년 전 | 173 | |
| 8221 | 9년 전 | 80 | ||
| 8220 | 9년 전 | 90 | ||
| 8219 | 9년 전 | 93 | ||
| 8218 | 9년 전 | 127 | ||
| 8217 |
star3840
|
9년 전 | 103 | |
| 8216 | 9년 전 | 151 | ||
| 8215 | 9년 전 | 100 | ||
| 8214 | 9년 전 | 217 | ||
| 8213 | 9년 전 | 148 | ||
| 8212 | 9년 전 | 76 | ||
| 8211 | 9년 전 | 235 | ||
| 8210 | 9년 전 | 235 | ||
| 8209 | 9년 전 | 327 | ||
| 8208 | 9년 전 | 205 | ||
| 8207 | 9년 전 | 216 | ||
| 8206 |
|
9년 전 | 175 | |
| 8205 | 9년 전 | 160 | ||
| 8204 | 9년 전 | 122 | ||
| 8203 | 9년 전 | 222 | ||
| 8202 | 9년 전 | 133 | ||
| 8201 | 9년 전 | 172 | ||
| 8200 | 9년 전 | 149 | ||
| 8199 | 9년 전 | 198 | ||
| 8198 | 9년 전 | 165 | ||
| 8197 | 9년 전 | 152 | ||
| 8196 | 9년 전 | 539 | ||
| 8195 | 9년 전 | 147 | ||
| 8194 | 9년 전 | 275 | ||
| 8193 | 9년 전 | 149 | ||
| 8192 | 9년 전 | 176 | ||
| 8191 | 9년 전 | 128 | ||
| 8190 | 9년 전 | 121 | ||
| 8189 | 9년 전 | 179 | ||
| 8188 | 9년 전 | 122 | ||
| 8187 | 9년 전 | 132 | ||
| 8186 | 9년 전 | 135 | ||
| 8185 | 9년 전 | 301 | ||
| 8184 | 9년 전 | 98 | ||
| 8183 | 9년 전 | 316 | ||
| 8182 | 9년 전 | 158 | ||
| 8181 | 9년 전 | 120 | ||
| 8180 | 9년 전 | 687 | ||
| 8179 | 9년 전 | 478 | ||
| 8178 | 9년 전 | 297 | ||
| 8177 |
kiplayer
|
9년 전 | 302 | |
| 8176 | 9년 전 | 341 | ||
| 8175 | 9년 전 | 211 | ||
| 8174 | 9년 전 | 229 | ||
| 8173 | 9년 전 | 337 | ||
| 8172 | 9년 전 | 185 | ||
| 8171 | 9년 전 | 175 | ||
| 8170 | 9년 전 | 286 | ||
| 8169 |
커네드커네드
|
9년 전 | 250 | |
| 8168 | 9년 전 | 310 | ||
| 8167 | 9년 전 | 311 | ||
| 8166 | 9년 전 | 226 | ||
| 8165 | 9년 전 | 156 | ||
| 8164 | 9년 전 | 295 | ||
| 8163 | 9년 전 | 276 | ||
| 8162 | 9년 전 | 289 | ||
| 8161 | 9년 전 | 283 | ||
| 8160 |
|
9년 전 | 479 | |
| 8159 | 9년 전 | 413 | ||
| 8158 | 9년 전 | 230 | ||
| 8157 | 9년 전 | 365 | ||
| 8156 | 9년 전 | 271 | ||
| 8155 | 9년 전 | 244 | ||
| 8154 |
00년생용띠
|
9년 전 | 593 | |
| 8153 | 9년 전 | 221 | ||
| 8152 |
|
9년 전 | 395 | |
| 8151 | 9년 전 | 397 | ||
| 8150 | 9년 전 | 491 | ||
| 8149 |
Jangfolk
|
9년 전 | 333 | |
| 8148 | 9년 전 | 157 | ||
| 8147 | 9년 전 | 365 | ||
| 8146 | 9년 전 | 424 | ||
| 8145 | 9년 전 | 366 | ||
| 8144 | 9년 전 | 335 | ||
| 8143 | 9년 전 | 182 | ||
| 8142 | 9년 전 | 421 | ||
| 8141 | 9년 전 | 371 | ||
| 8140 | 9년 전 | 918 | ||
| 8139 | 9년 전 | 251 | ||
| 8138 |
전갈자리남자
|
9년 전 | 378 | |
| 8137 | 9년 전 | 380 | ||
| 8136 | 9년 전 | 735 | ||
| 8135 |
|
9년 전 | 784 | |
| 8134 |
PlayPixel
|
9년 전 | 501 | |
| 8133 |
|
9년 전 | 427 | |
| 8132 | 9년 전 | 439 | ||
| 8131 | 9년 전 | 802 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기