Team:KAIST-Korea/Test Count

From 2011.igem.org

(Difference between revisions)
Line 1: Line 1:
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
<script src="http://www.gmodules.com/ig/ifr?url=http://cale
-
<html xmlns="http://www.w3.org/1999/xhtml" >
+
-
<head><title></title>
+
-
    <script type="text/javascript">
+
-
        var strDate = "2011-11-08"; //여기에 목표가 되는 날짜(연-월-일)을(를) 입력합니다.
+
-
        var strTime = "23:59:00";    //여기에 목표가 되는 시간(시:분:초)을(를) 입력합니다.
+
-
        var arrDate = strDate.split("-");
+
-
        var arrTime = strTime.split(":");
+
-
        var arrMonth = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
+
-
     
+
-
        function Dday_countdown(){
+
-
            var now = new Date();
+
-
            var nYear = now.getYear();
+
-
            var nMonth = now.getMonth();
+
-
            var nDay = now.getDate();
+
-
            var nHour = now.getHours();
+
-
            var nMin = now.getMinutes();
+
-
            var nSec = now.getSeconds();
+
-
            var strnow = arrMonth[nMonth] + " " + nDay + ", " + nYear + " " + nHour + ":" + nMin + ":" + nSec;
+
-
            var strfuture = arrMonth[arrDate[1] - 1] + " " + arrDate[2] + ", " + arrDate[0] + " " + arrTime[0] + ":" + arrTime[1] + ":" + arrTime[2];
+
-
            var d_date = Date.parse(strfuture) - Date.parse(strnow);
+
-
         
+
-
            d_day = Math.floor(d_date / 86400000);
+
-
            d_hour = Math.floor((d_date % 86400000) / 3600000);
+
-
            d_min = Math.floor(((d_date % 86400000) % 3600000) / 60000);
+
-
            d_sec = Math.floor((((d_date % 86400000) % 3600000) % 60000) / 1000);
+
   
   
-
            var oTimeCnt = document.getElementById("Timecount");
+
begg.com/countdown.xml&amp;up_eve=&amp;up_mon=&amp;up_dat=&
-
            if (d_day <= 0 && d_hour <= 0 && d_min <= 0 && d_sec <= 1 && nDay == arrDate[1]) oTimeCnt.innerHTML = "D-Day 입니다.";
+
-
            else if (d_day <= -1) oTimeCnt.innerHTML = Math.abs(d_day) + "일 " + Math.abs(d_hour) + "시간 " + Math.abs(d_min) + "분 " + Math.abs(d_sec) + "초 지났습니다.! ";
+
-
            else oTimeCnt.innerHTML = d_day + "일 " + d_hour + "시간 " + d_min + "분 " + d_sec + "초 남았습니다.";
+
   
   
-
            setTimeout("Dday_countdown()", 1000);
+
amp;up_yer=&amp;synd=open&amp;w=320&amp;h=80&amp;title=__MS
   
   
-
        }
+
G_countdown__+&amp;lang=ko&amp;country=ALL&amp;border=%23ff
-
        window.onload = Dday_countdown;
+
-
    </script>
+
ffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script>
-
</head>
+
-
<body>
+
-
<div id="Timecount"></div>
+
-
</body>
+
-
</html>
+

Revision as of 10:06, 8 July 2011

<script src="http://www.gmodules.com/ig/ifr?url=http://cale

begg.com/countdown.xml&up_eve=&up_mon=&up_dat=&

amp;up_yer=&synd=open&w=320&h=80&title=__MS

G_countdown__+&lang=ko&country=ALL&border=%23ff

ffff%7C3px%2C1px+solid+%23999999&output=js"></script>