남은시간 카운트 : 2022-12-25-13:30:00 > 팁

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

남은시간 카운트 : 2022-12-25-13:30:00

페이지 정보

profile_image
작성자 비타주리
댓글 0건 조회 3,670회 작성일 22-05-11 12:37

본문

<link href=https://fonts.googleapis.com/css2?family=Lato&display=swap rel=stylesheet>
<style>
#countSpan { font-family:Lato; font-weight:bold; font-size:3rem; }
#countSpan span { font-size:2rem; }
</style>
<script>
targetTime = "2022-12-25-13:30:00";
document.write("<div style=text-align:center;padding-top:20px><span id=countSpan></span></div>");
targetCount = targetTime.split("-")[1] + "-" + targetTime.split("-")[2] + "-" + targetTime.split("-")[0] + "-" + targetTime.split("-")[3];
function countInterval() {
    countTime = new Date(targetCount) - new Date();
    countDay = Math.floor(countTime / (1000 * 60 * 60 * 24)) < 1 ? "" : Math.floor(countTime / (1000 * 60 * 60 * 24)) + "<span>일</span> ";
    countHour = ("0" + Math.floor(countTime % (1000 * 60 * 60 * 24) / (1000 * 60 * 60))).slice(-2) + ":";
    countMinute = ("0" + Math.floor(countTime % (1000 * 60 * 60) / (1000 * 60))).slice(-2) + ":";
    countSecond = ("0" + Math.floor(countTime % (1000 * 60) / 1000)).slice(-2);
    if (countTime < 1) {
        countSpan.innerHTML = "이벤트 종료";
        clearInterval(countMode);
    }
    else countSpan.innerHTML = countDay  + countHour + countMinute + countSecond; 
}
countInterval();
countMode = setInterval(countInterval, 1000);
</script>

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

회사명 : 회사명 / 대표 : 대표자명
주소 : OO도 OO시 OO구 OO동 123-45
사업자 등록번호 : 123-45-67890
전화 : 02-123-4567 팩스 : 02-123-4568
통신판매업신고번호 : 제 OO구 - 123호
개인정보관리책임자 : 정보책임자명

공지사항

  • 게시물이 없습니다.

접속자집계

오늘
140
어제
179
최대
526
전체
106,980
Copyright © 소유하신 도메인. All rights reserved.