좋은 JS HTML 페이지 카운트 다운은 단순하지만 단순하지만 실용적입니다.
<! docType html> <html> <head> <meta charset = "utf-8"> </head> <hod> <div id = "countmsg"> <span id = "t_d"> 00 일 </span> <span id = "t_h"> 00 시간 </span id = "t_m"> 00 </span id = "t_s"> SECONDS </span> </div> <script type = "text/javaScript"> 함수 getRtime () {var endtime = new Date ( '2014/10/23 10:00:00'); // 마감일 var nowtime = new Date (); var t = endtime.gettime () - nowtime.gettime (); /*var d = math.floor (t/1000/60/60/24); t- = d*(1000*60*60*24); var h = Math.floor (t/1000/60/60); t- = H*60*60*1000; var m = math.floor (t/1000/60/60); t- = m*60*1000; var s = math.floor (t/1000);*/var d = math.floor (t/1000/60/60/24); var h = math.floor (t/1000/60/60%24); var m = math.floor (t/1000/60%60); var s = math.floor (t/1000%60); document.getElementById ( "t_d"). innerhtml = d + "day"; document.getElementById ( "t_h"). innerHtml = h + "time"; document.getElementById ( "t_m"). innerHtml = m + "ming"; document.getElementById ( "t_s"). innerHtml = s + "seconds"; } setInterVal (GetRtime, 1000); </script> </body> </html>