ȸ¿ø°¡ÀԡžÆÀ̵ð/ºñ¹øã±â
ȨÀ¸·Î

±ò²ûÇÑ À¥¿ë ½Ã°è´Þ·Â
9³â Àü
<script>
var WebClock = function(){
        this.drawTarget = "webClock";
        
        //¼³Á¤ ½ÃÀÛ
        this.color = "#fff"; //±ÛÀÚ»ö
        this.backgroundColor = "#000"; //¹è°æ»ö
        this.align = "center"; //Á¤·Ä(left, center, right)
        this.fontType = "Century Gothic"; //±Û²Ã
        this.fontSize = 45; //½Ã°è ±Û²ÃÅ©±â(Âü°í: am,pmÀº ÀÌ »çÀÌÁîÀÇ 1/2)
        
        this.clockBarHeight = 2; //ÃʺκÐÀÇ BAR µÎ²²
        this.clockBarColor = "#ccc"; //ÃʺκР»ö»ó
        
        this.calendarFontSize = 15; //´Þ·ÂºÎºÐ ±Û²ÃÅ©±â
        //¼³Á¤ ³¡
        this.strMonth = ["January",
                                        "February",
                                        "March",
                                        "April",
                                        "May",
                                        "June",
                                        "July",
                                        "August",
                                        "September",
                                        "October",
                                        "November",
                                        "December"];
        this.strWeek =  ["Sun",
                                        "Mon",
                                        "Tue",
                                        "Wed",
                                        "Thu",
                                        "Fri",
                                        "Sat"];
        
        this.start = function(){
                var now = new Date();
                var year = now.getFullYear();
                var month = now.getMonth();
                var day = now.getDate();
                var hours = now.getHours();
                var minutes = now.getMinutes();
                var seconds = now.getSeconds();
                var clockBarWidth = 4 * seconds;
                var strAmPm = hours < 12 ? "AM" : "PM";
                
                hours = hours > 12 ? hours - 12 : hours;
                hours = hours == 0 ? hours + 12 : hours;
                hours = hours < 10 ? "0" + hours : hours;
                minutes = minutes < 10 ? "0" + minutes : minutes;
                seconds = seconds < 10 ? "0" + seconds : seconds;
                
                this.layerCalendar.innerHTML = year + " " + this.strMonth[month] + " " + day + " " + this.strWeek[now.getDay()];
                this.layerTime.innerHTML = hours + ":" + minutes + ":" + seconds;
                this.layerAmPm.innerHTML = strAmPm;
                
                this.layerClockBar.style.width = clockBarWidth + "px";
                setTimeout(function(){oWebClock.start();}, 1000);
        };
        
        this.init = function(){
                this.layerTime = document.createElement("span");
                this.layerAmPm = document.createElement("span");
                this.layerAmPm.style.fontSize = "0.5em";
                
                this.layerCalendar = document.createElement("div");
                this.layerCalendar.style.fontWeight = "bold";
                this.layerCalendar.style.fontSize = this.calendarFontSize + "px";
                
                this.layerClock = document.createElement("div");
                
                this.layerClockBar = document.createElement("div");
                this.layerClockBar.style.fontSize = this.clockBarHeight + "px";
                this.layerClockBar.style.height = this.clockBarHeight + "px";
                this.layerClockBar.style.background = this.clockBarColor;
                
                var layerTarget = document.getElementById(this.drawTarget);
                layerTarget.style.color = this.color;
                layerTarget.style.background = this.backgroundColor;
                layerTarget.style.fontFamily = this.fontType;
                layerTarget.style.fontSize = this.fontSize + "px";
                layerTarget.style.padding = "10px";
                layerTarget.align = this.align;
                layerTarget.appendChild(this.layerClock);
                layerTarget.appendChild(this.layerClockBar);
                layerTarget.appendChild(this.layerCalendar);
                
                this.layerClock.appendChild(this.layerTime);
                this.layerClock.appendChild(this.layerAmPm);
                this.start();
        };
};
var oWebClock = new WebClock();
if(document.all){
        window.attachEvent("onload", function(){oWebClock.init();});
}else{
        window.addEventListener("load", function(){oWebClock.init();}, false);
};
</script>

<div id="webClock"></div>
ÃßõÃßõ : 391 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
2,585
HTTP Content-Type Á¤¸®
2,584
PHP ¿¡¼­ ³¯Â¥ Ãâ·ÂÇÒ¶§ »ç¿ëÇÏ´Â ÇÔ¼ö.
2,583
Æ˾÷â °ü·Ã ÀÚ¹Ù½ºÅ©¸³Æ®
2,582
PHP ³¯Â¥/½Ã°£ Á¤¸®
±ò²ûÇÑ À¥¿ë ½Ã°è´Þ·Â
2,580
PHP¿¡¼­ ¿ø°Ý À̹ÌÁöÀÇ À¯È¿¼ºÀ» üũÇÏ´Â ¹æ¹ý
2,579
Use kakaolink on Android WebView
2,578
Á¤±Ô½Ä ¹®¹ý
2,577
ÇѱÛ, ¿µ¹®, ¼ýÀÚ, Ư¼ö¹®ÀÚ Ã¼Å©ÇÏ´Â ÇÔ¼ö
2,576
ÀÚÁÖ ¾²ÀÌ´Â Á¤±ÔÇ¥Çö½Ä ¸ðÀ½
2,575
[ÀÚ¹Ù½ºÅ©¸³Æ®] ½Ç½Ã°£ ½Ã°è ¸¸µé±â
2,574
¸ð¹ÙÀÏ À¥ÆäÀÌÁö CSS - emÀ» pxó·³ ÆíÇÏ°Ô »ç¿ëÇÏ´Â ¹æ¹ý
2,573
[html5] audio ű׷ΠÀ½¾Ç ÆÄÀÏ »ðÀÔ
2,572
±¸±Û ¾Öµå¼¾½º ÇѱÛ, Çѱ¹ ±¤°í ³ª¿À°Ô ¸¸µé±â
2,571
±Ã±ØÀÇ ¾ÆÀÌÇÁ·¹ÀÓ ³ôÀÌ ÀÚµ¿ Á¶Àý
2,570
PHP·Î Internet Explorer ¹öÀü ¾Ë¾Æ³»±â
2,569
PHP·Î À̹ÌÁö ÁÖ¼Ò ¼û±â±â
2,568
À¯Åõºê ÁÖ¼Ò¿¡¼­ ¾ÆÀ̵𸸠»Ì¾Æ¿À±â
2,567
preg_match_all ¸ÆÁÖ¼Ò ÃßÃâ
2,566
URL¿¡¼­ µµ¸ÞÀθ¸ ÃßÃâÇϱâ
2,565
¸ÞŸÅ±׸¦ ÃßÃâÇØÁÖ´Â get_meta_tags ÇÔ¼ö
2,564
PHP Á¤±Ô½ÄÀ» È°¿ëÇÑ ÅÂ±× ¹× ƯÁ¤ ¹®ÀÚ¿­ Á¦°Å ¹× ÃßÃâ ¹æ¹ý
2,563
preg_match
2,562
À̹ÌÁö Å©±â¸¦ ºñÀ²¿¡ ¸Â°Ô Á¶ÀýÇÑ´Ù.
2,561
$_REQUEST - GET¹æ½Ä,POST¹æ½Ä ±¸ºÐÇÏÁö ¾Ê°í °ª ¹Þ±â
2,560
<UL><LI>¸¦ ÀÌ¿ëÇÑ °¡·ÎÁ¤·Ä ¸Þ´º ¸¸µé±â
2,559
Android KitKat (4.4) video autoplay does not work anymore in webview
2,558
°ü°è ¿¬»êÀÚ
2,557
º´ÇÕ ¿¬»êÀÚ
2,556
SUBSTR ÇÔ¼ö
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.