본문 바로가기

º Learning 。/♂ Javascript ♀

Date의 toLocaleString() 메소드

<script type="text/javascript">
   today = new Date();
   document.write( "<p><center><b>접속 날짜와 시간 : " );
   // 금일 년, 월, 일, 요일, 시간을 출력
   document.write( today.toLocaleString() + "</b></center>" );
</script>

결과값