지정한 월(月)의 마지막 날짜가 언제인지 알려줍니다 > script

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

script

지정한 월(月)의 마지막 날짜가 언제인지 알려줍니다

페이지 정보

작성자 서방님 댓글 0건 조회 77회 작성일 07-08-11 20:31

본문

<HTML>
<HEAD>
    <TITLE>BLUEB</TITLE>
</head>

<body>


<script>
function lastday(calyear,calmonth)
{
    var  dayOfMonth  = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
        if (((calyear %4 == 0) && (calyear % 100 != 0))||(calyear % 400 == 0))
            dayOfMonth[1] = 29;
        var nDays = dayOfMonth[calmonth-1];
    return nDays;
}

document.write ('2012년 12월은<b>');
document.write (lastday(2012,2)); //날짜지정
document.write (' </b>일이 마지막 날짜입니다.');
</script>

댓글목록

등록된 댓글이 없습니다.

Total 846건 27 페이지
게시물 검색

회원로그인

접속자집계

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

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