묻고답하기

<script language="JavaScript">
<!--
function namosw_init_clock()
{
var type, i, top, obj, clocks;
clocks = new Array();
for (i = 0, top = 0; i < namosw_init_clock.arguments.length; i += 2) {
obj = eval('document.'+namosw_init_clock.arguments[i]);
if (obj == null) continue;
if ((type = namosw_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.namosw_clocks = clocks;
namosw_clock();
}
}

function namosw_clock()
{
var i, type, clocks, next_call, str, hour, ampm, now, year2, year4;
clocks = document.namosw_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("namosw_clock();", 1000);
}

//-->
</script>

<body OnLoad="namosw_init_clock('form1.textclock1', 11)">
<form name="form1">
<p><input type="text" name="textclock1" size="29"></p>
</form>


보디....인풋 명령어를 지웠더니 날짜/시간이 나오지 않아요!!
인풋 박스를 지우고 싶은데 어떻게 해야 하나요?
박스 말고 날짜하고 시간만 나오게 하고 싶은데...추가로 폰트 색상도 바꾸고 싶은데(제가 초보에요! 위소스는 구한건데 자세한 설명이 없어서요!!)
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
remon 링크걸기;; [2] 2007.08.10
미쯔º □ ºa 원하는곳에 부메뉴를 설정하려하는데..  
표자두임충 노프레임에서 로그인하면 새창으로 바뀌지 않게 하는 방법 없나요? [1] 2007.08.10
손영환 노프레임 만들기 질문(제로보드) [1] 2007.08.10
Ondol 표를.. 마우스 가따데면 룰오버 되게 만드는거좀.. [1] 2007.08.10
쪼꼬바 암호화가 되어있는 코드를 풀고싶은데요. [1] 2007.08.10
김경희 노프레임에 게시판 넣기 말인데요 (제로보드 말고 [1] 2007.08.10
한명훈 이 게시판 소스 좀 봐주세요... [4] 2007.08.10
SkinBy 안녕하세요~ 질문 좀 올리겠습니다. [1] file 2007.08.10
.maya 레이어 위치 고정에 관한 자스 소스...=_=  
문준석 노프레임 홈피에 제로보드 삽입하기.. [1] 2007.08.10
이장희 게시판 통체 인클루드..안된다..ㅠ,ㅠ  
윤동민 php로 가입폼좀 알아볼려고하는데.소스있는곳좀..  
니지 mss로 주소가 되어있는 배경음악을 쓸 경우. [1] 2007.08.10
최경준 [php] 새로고침시 페이지 무효화 [1] 2007.08.10
박선우 죄송한데요, 이폰트가 뭔지 아시는분 계세요? [4] 2007.08.10
권현영 메뉴때문에 에러가..ㅠ,ㅜ [4] 2007.08.10
유세하 드림위버에서... [2] 2007.08.10
[-_-]KLclub 그림이 소스만으로 반대로 나오게 할수있을까요? [1] 2007.08.10
▒─파리채 apm이요.. [1] 2007.08.10