스크립트 날짜 형태 모음 > script

본문 바로가기
사이트 내 전체검색

script

스크립트 날짜 형태 모음

페이지 정보

작성자 서방님 댓글 0건 조회 185회 작성일 07-06-22 16:52

본문

<SCRIPT Language="Javascript">
<!-- 감춤
now=new Date();
document.write('<TR><TD>now</TD><TD>= ',now,'</TD></TR>');
document.write('<TR><TD>now.getDate()</TD><TD>= ',now.getDate(),'</TD></TR>');
document.write('<TR><TD>now.getHours()</TD><TD>= ',now.getHours(),'</TD></TR>');
document.write('<TR><TD>now.toGMTString()</TD><TD>= ',now.toGMTString(),'</TD></TR>');
document.write('<TR><TD>now.toLocaleString()</TD><TD>= ',now.toLocaleString(),'</TD></TR>');
document.write('<TR><TD>now.getDate()</TD><TD>= ',now.getDate(),'</TD></TR>');
document.write('<TR><TD>now.getDay()</TD><TD>= ',now.getDay(),'</TD></TR>');
document.write('<TR><TD>now.getHours()</TD><TD>= ',now.getHours(),'</TD></TR>');
document.write('<TR><TD>now.getMinutes()</TD><TD>= ',now.getMinutes(),'</TD></TR>');
document.write('<TR><TD>now.getMonth()</TD><TD>= ',now.getMonth(),'</TD></TR>');
document.write('<TR><TD>now.getSeconds()</TD><TD>= ',now.getSeconds(),'</TD></TR>');
document.write('<TR><TD>now.getTime()</TD><TD>= ',now.getTime(),'</TD></TR>');
document.write('<TR><TD>now.getTimezoneOffset()</TD><TD>= ',now.getTimezoneOffset(),'</TD></TR>');
document.write('<TR><TD>now.getYear()</TD><TD>= ',now.getYear(),'</TD></TR>');
document.write('<TR><TD><B>현재 시각</B> ');
document.write('(window status에도 나타남)</TD>');
timeValue=now.getYear()+'/'+(now.getMonth()+1)+'/'+now.getDate()+' ';
hours=now.getHours();
ampm=((hours >12) ? 'pm' : 'am');
hours=((hours >12) ? hours -12 : hours);
timeValue +=((hours < 10) ? ':0' : ':')+hours;
minutes=now.getMinutes();
timeValue +=((minutes < 10) ? ':0' : ':')+minutes;
seconds=now.getSeconds();
timeValue +=((seconds < 10) ? ':0' : ':')+seconds;
document.write('<TD>= <FONT color=0000ff><B>',timeValue+'</B></FONT><FONT color=ff0000> '+ampm.sup
(),'</FONT></TD></TR>');
window.status=timeValue+' '+ampm;
document.write('<TR><TD>페이지 최종 수정 document.lastModified</TD>');
document.write('<TD>= <FONT color=409040><B>',document.lastModified,'</B></FONT></TD></TR>');
// 감춤 끝  -->
</SCRIPT>

 

=============================================================

now = Thu Jun 15 13:08:16 UTC+0900 2006
now.getDate() = 15
now.getHours() = 13
now.toGMTString() = Thu, 15 Jun 2006 04:08:16 UTC
now.toLocaleString() = 2006년 6월 15일 목요일 오후 1:08:16
now.getDate() = 15
now.getDay() = 4
now.getHours() = 13
now.getMinutes() = 8
now.getMonth() = 5
now.getSeconds() = 16
now.getTime() = 1150344496125
now.getTimezoneOffset() = -540
now.getYear() = 2006
현재 시각 (window status에도 나타남) = 2006/6/15 :01:08:16 pm
페이지 최종 수정 document.lastModified = 06/15/2006 13:08:16


출처 : http://taeyo.net/threadboard/Content.asp?table=Board_Knowhow&seqs=1135

댓글목록

등록된 댓글이 없습니다.

Total 846건 43 페이지
script 목록
번호 제목 글쓴이 조회 날짜
216 서방님 191 07-06
215 서방님 194 06-27
214 서방님 192 06-27
213 서방님 114 06-27
212 서방님 159 06-27
211 서방님 216 06-22
열람중 서방님 186 06-22
209 서방님 54 06-11
208 서방님 126 06-11
207 서방님 108 05-30
206 서방님 213 04-26
205 서방님 130 04-25
204 서방님 156 04-25
203 서방님 84 04-25
202 서방님 102 04-25
게시물 검색

회원로그인

접속자집계

오늘
23
어제
302
최대
1,347
전체
155,084
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.