디지털시계
페이지 정보
작성자 비타주리 작성일 22-05-09 16:56 조회 3,335 댓글 1본문
<link href=https://fonts.googleapis.com/css2?family=Lato&display=swap rel=stylesheet>
<style>
#todayTable { border-collapse:collapse; font-family:Lato; font-weight:bold; }
#todayHead { text-align:center; padding:0px; font-size:4rem; }
#todayTail { text-align:center; padding:0px ; font-size:2rem; }
</style>
<script>
document.write("<div style=padding:5%><table id=todayTable align=center><tr><td id=todayHead></td></tr><tr><td id=todayTail></td></tr></table></div>");
function todayMode() {
todayTime = new Date();
todayHead.innerText = String(todayTime).split(" ")[4];
currentYear = todayTime.getFullYear() + ".";
currentMonth = ("0" + (todayTime.getMonth() + 1)).slice(-2) + ".";
currentDay = ("0" + todayTime.getDate()).slice(-2) + ".";
todayTail.innerText = currentYear + currentMonth + currentDay + String(todayTime).split(" ")[0];
}
todayMode();
setInterval(todayMode, 1000);
</script>
<style>
#todayTable { border-collapse:collapse; font-family:Lato; font-weight:bold; }
#todayHead { text-align:center; padding:0px; font-size:4rem; }
#todayTail { text-align:center; padding:0px ; font-size:2rem; }
</style>
<script>
document.write("<div style=padding:5%><table id=todayTable align=center><tr><td id=todayHead></td></tr><tr><td id=todayTail></td></tr></table></div>");
function todayMode() {
todayTime = new Date();
todayHead.innerText = String(todayTime).split(" ")[4];
currentYear = todayTime.getFullYear() + ".";
currentMonth = ("0" + (todayTime.getMonth() + 1)).slice(-2) + ".";
currentDay = ("0" + todayTime.getDate()).slice(-2) + ".";
todayTail.innerText = currentYear + currentMonth + currentDay + String(todayTime).split(" ")[0];
}
todayMode();
setInterval(todayMode, 1000);
</script>
비타주리님의 댓글
비타주리 작성일----------
원문 - 영문요일 : https://sir.kr/g5_tip/18447
댓글 - 한글요일 : https://sir.kr/g5_tip/18447#c_18466