2014-04-14 2 views
0

안녕 친구 나는 곧 HTML 템플릿을 만드는 중이라서 및HTML 템플릿과 사용 카운트 다운 타이머

내가 자바 스크립트가 atumatically

을 실행 만들고 싶어 내가 1 초 후 자동으로 시간 새로 고침을 만들고 싶어 카운트 다운 타이머, 를 사용하여
<!DOCTYPE HTML> 
    <html lang="en"> 
    <head> 
     <meta charset="utf-8"> 
     <meta name="viewport" content="width=device-width"> 

     <meta name="keywords" content="nineforo,9foro"> 
     <title>9foro | Coming soon</title> 
     <link rel="stylesheet" href="" type="text/css"> 
     <link href='http://fonts.googleapis.com/css?family=Philosopher:700' rel='stylesheet' type='text/css'> 
     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 
     <script type="text/javascript" src="jquery.countdown.pack.js"></script> 
     <!--[if lt IE 9]> 
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> 
     <![endif]-->  
     <script type="text/javascript"> 
      $(function() { 
       $('#countdown').countdown({until: new Date(2014, 5 - 1, 1)}); 
      }); 
     </script> 
    </head> 

    <body> 
    <div id="wrapper"> 
     <header> 
      <h2>9fORO</h2> 

     <section id="timer"> 
      <p>Estimated time remaining before official launch:</p> 
      <div id="countdown"></div> 
     </section> 
    </div> 
    </body> 
    </html> 
+0

을 시도 할 수 있습니다 [window.setInternal을 (http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_setinterval) – Arvind

답변

0

스크립트 jquery.countdown.pack.js을 찾을 수 없습니다. 하지만 당신은 u를 사용하려고 할 수 있습니다 https://github.com/hilios/jQuery.countdown

<!DOCTYPE HTML> 
<html lang="en"> 
    <head> 
     <meta charset="utf-8"> 
     <meta name="viewport" content="width=device-width"> 

     <meta name="keywords" content="nineforo,9foro"> 
     <title>9foro | Coming soon</title> 
     <link rel="stylesheet" href="" type="text/css"> 
     <link href='http://fonts.googleapis.com/css?family=Philosopher:700' rel='stylesheet' type='text/css'> 
     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> 
     <script type="text/javascript" src="jquery.countdown.pack.js"></script> 
     <script type="text/javascript" src="https://raw.githubusercontent.com/hilios/jQuery.countdown/master/dist/jquery.countdown.min.js"></script> 
     <!--[if lt IE 9]> 
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> 
     <![endif]-->  
     <script type="text/javascript"> 
      $(function() { 
       $('#countdown').countdown("2014/14/04",function(event){ 
        $(this).html(event.strftime('%D days %H:%M:%S')); 
       }); 
      }); 
     </script> 
    </head> 

    <body> 
    <div id="wrapper"> 
     <header> 
      <h2>9fORO</h2> 

     <section id="timer"> 
      <p>Estimated time remaining before official launch:</p> 
      <div id="countdown"></div> 
     </section> 
    </div> 
    </body> 
</html>