Team:KAIST-Korea/Test Count

From 2011.igem.org

(Difference between revisions)
Line 22: Line 22:
             var d_date = Date.parse(strfuture) - Date.parse(strnow);
             var d_date = Date.parse(strfuture) - Date.parse(strnow);
   
   
-
            d_day = Math.floor(d_date / 86400000);
+
            d_day = Math.floor(d_date / 86400000);
             stmp = String(Math.floor((d_date % 86400000) / 3600000));
             stmp = String(Math.floor((d_date % 86400000) / 3600000));
             d_hour = stmp.length == 1 ? "0" + stmp : stmp;
             d_hour = stmp.length == 1 ? "0" + stmp : stmp;
Line 30: Line 30:
             d_sec = stmp.length == 1 ? "0" + stmp : stmp;
             d_sec = stmp.length == 1 ? "0" + stmp : stmp;
   
   
-
            var sDate = arrDate[0] + "년" + arrDate[1] + "월" + arrDate[2] + "일 까지 ";
+
            var sDate = arrDate[0] + "년" + arrDate[1] + "월" + arrDate[2] + "일 까지 ";
              
              
             var oTimeCnt = document.getElementById("Timecount");
             var oTimeCnt = document.getElementById("Timecount");
Line 36: Line 36:
             oTimeCnt.innerHTML = d_day + "일" + d_hour + "시" + d_min + "분" + d_sec + "초 남았습니다.";
             oTimeCnt.innerHTML = d_day + "일" + d_hour + "시" + d_min + "분" + d_sec + "초 남았습니다.";
   
   
-
            setTimeout("Dday_countdown()", 10);
+
            setTimeout("Dday_countdown()", 10);
         }
         }
         window.onload = Dday_countdown;
         window.onload = Dday_countdown;

Revision as of 09:57, 8 July 2011