이미지 시계(1)
페이지 정보
본문
<div id=todayDiv style=margin-top:50px;margin-bottom:50px>
<script>
topUrl = "/main/wittazzurri/today/"; // 디렉토리
basicGap = "2px"; // 기본간격
centerGap = "25px"; //중간간격
function todayMode() {
todayTime = new Date();
yearSplit = ("" + todayTime.getFullYear()).split("");
monthSplit = ("0" + (todayTime.getMonth() + 1)).slice(-2).split("");
daySplit = ("0" + todayTime.getDate()).slice(-2).split("");
hoursSplit = ("0" + todayTime.getHours()).slice(-2).split("");
minutesSplit = ("0" + todayTime.getMinutes()).slice(-2).split("");
secondsSplit = ("0" + todayTime.getSeconds()).slice(-2).split("");
for (day = 1; day <= 17; day++) {
if (day <= 4) this["day_" + day] = yearSplit[day - 1];
else if (day == 5) this["day_" + day] = "bar";
else if (day <= 7) this["day_" + day] = monthSplit[day - 6];
else if (day <= 9) this["day_" + day] = daySplit[day - 8];
else if (day <= 11) this["day_" + day] = hoursSplit[day - 10];
else if (day == 12) this["day_" + day] = "colon";
else if (day <= 14) this["day_" + day] = minutesSplit[day - 13];
else if (day == 15) this["day_" + day] = "colon";
else if (day <= 17) this["day_" + day] = secondsSplit[day - 16];
}
}
todayMode();
for (day = 1; day <= 17; day++) {
if (day == 1) timerGap = "0px";
else if (day == 10) timerGap = centerGap;
else timerGap = basicGap;
document.write("<img id=time_" + day + " src=" + topUrl + this['day_' + day] + ".png style=margin-left:" + timerGap + ";display:block;float:left;>");
}
setInterval(function() {
todayMode();
for (day = 1; day <= 17; day++) this['time_' + day].src = topUrl + this['day_' + day] + ".png";
}, 500);
</script>
<div style=clear:both></div>
</div>
<script>
topUrl = "/main/wittazzurri/today/"; // 디렉토리
basicGap = "2px"; // 기본간격
centerGap = "25px"; //중간간격
function todayMode() {
todayTime = new Date();
yearSplit = ("" + todayTime.getFullYear()).split("");
monthSplit = ("0" + (todayTime.getMonth() + 1)).slice(-2).split("");
daySplit = ("0" + todayTime.getDate()).slice(-2).split("");
hoursSplit = ("0" + todayTime.getHours()).slice(-2).split("");
minutesSplit = ("0" + todayTime.getMinutes()).slice(-2).split("");
secondsSplit = ("0" + todayTime.getSeconds()).slice(-2).split("");
for (day = 1; day <= 17; day++) {
if (day <= 4) this["day_" + day] = yearSplit[day - 1];
else if (day == 5) this["day_" + day] = "bar";
else if (day <= 7) this["day_" + day] = monthSplit[day - 6];
else if (day <= 9) this["day_" + day] = daySplit[day - 8];
else if (day <= 11) this["day_" + day] = hoursSplit[day - 10];
else if (day == 12) this["day_" + day] = "colon";
else if (day <= 14) this["day_" + day] = minutesSplit[day - 13];
else if (day == 15) this["day_" + day] = "colon";
else if (day <= 17) this["day_" + day] = secondsSplit[day - 16];
}
}
todayMode();
for (day = 1; day <= 17; day++) {
if (day == 1) timerGap = "0px";
else if (day == 10) timerGap = centerGap;
else timerGap = basicGap;
document.write("<img id=time_" + day + " src=" + topUrl + this['day_' + day] + ".png style=margin-left:" + timerGap + ";display:block;float:left;>");
}
setInterval(function() {
todayMode();
for (day = 1; day <= 17; day++) this['time_' + day].src = topUrl + this['day_' + day] + ".png";
}, 500);
</script>
<div style=clear:both></div>
</div>
- 이전글이미지시계(2) 21.09.07
- 다음글갤러리 리스트 썸네일형 샘플 21.09.02
댓글목록
등록된 댓글이 없습니다.