[java] 스크립트 – 날짜와 시간 표시 하기
스크립트 – 날짜와 시간 표시 하기
<script language=”JavaScript”>
<!–
function MakeArraya(size)
{
this.length = size;
for(var i = 1; i <= size; i++)
{
this[i] = “”;
}
return this;
}
function MakeArrayb(size)
{
this.length = size;
for(var i = 1; i <= size; i++)
{
this[i] = “”;
}
return this;
}
function showtime () {
var now = new Date();
var year = now.getYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var day = now.getDay();
Day = new MakeArraya(7);
Day[0]=”일요일”;
Day[1]=”월요일”;
Day[2]=”화요일”;
Day[3]=”수요일”;
Day[4]=”목요일”;
Day[5]=”금요일”;
Day[6]=”토요일”;
Month = new MakeArrayb(12);
Month[1]=”1월”;
Month[2]=”2월”;
Month[3]=”3월”;
Month[4]=”4월”;
Month[5]=”5월”;
Month[6]=”6월”;
Month[7]=”7월”;
Month[8]=”8월t”;
Month[9]=”9월”;
Month[10]=”10월”;
Month[11]=”11월”;
Month[12]=”12월”;
var timeValue = “”;
timeValue += + year + ” “;
timeValue += (Month[month]) + ” “;
timeValue += date + ” (” ;
timeValue += (Day[day]) + “) “;
document.write(” ” + timeValue + ” “);
}
showtime();
// –>
</script>
3 Responses
… [Trackback]
[…] Info to that Topic: nblog.syszone.co.kr/archives/814 […]
… [Trackback]
[…] Here you will find 4574 more Info to that Topic: nblog.syszone.co.kr/archives/814 […]
… [Trackback]
[…] Find More here to that Topic: nblog.syszone.co.kr/archives/814 […]