이미지시계(2)
페이지 정보
작성자 비타주리 작성일 21-09-07 11:48 조회 7,434 댓글 0본문
<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 <= 18; day++) {
if (day <= 4) this["day_" + day] = yearSplit[day - 1];
else if (day == 5) this["day_" + day] = "colon";
else if (day <= 7) this["day_" + day] = monthSplit[day - 6];
else if (day == 8) this["day_" + day] = "colon";
else if (day <= 10) this["day_" + day] = daySplit[day - 9];
else if (day <= 12) this["day_" + day] = hoursSplit[day - 11];
else if (day == 13) this["day_" + day] = "colon";
else if (day <= 15) this["day_" + day] = minutesSplit[day - 14];
else if (day == 16) this["day_" + day] = "colon";
else if (day <= 18) this["day_" + day] = secondsSplit[day - 17];
}
}
todayMode();
for (day = 1; day <= 18; day++) {
if (day == 1) timerGap = "0px";
else if (day == 11) 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 <= 18; 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 <= 18; day++) {
if (day <= 4) this["day_" + day] = yearSplit[day - 1];
else if (day == 5) this["day_" + day] = "colon";
else if (day <= 7) this["day_" + day] = monthSplit[day - 6];
else if (day == 8) this["day_" + day] = "colon";
else if (day <= 10) this["day_" + day] = daySplit[day - 9];
else if (day <= 12) this["day_" + day] = hoursSplit[day - 11];
else if (day == 13) this["day_" + day] = "colon";
else if (day <= 15) this["day_" + day] = minutesSplit[day - 14];
else if (day == 16) this["day_" + day] = "colon";
else if (day <= 18) this["day_" + day] = secondsSplit[day - 17];
}
}
todayMode();
for (day = 1; day <= 18; day++) {
if (day == 1) timerGap = "0px";
else if (day == 11) 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 <= 18; day++) this['time_' + day].src = topUrl + this['day_' + day] + ".png";
}, 500);
</script>
<div style=clear:both></div>
</div>
댓글목록 0
등록된 댓글이 없습니다.