2011-12-01 46 views
0

我在互联网上使用源代码。它只显示正确,但没有结果。这里是我的代码如何使用倒计时jquery插件

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
     <head> 
      <link rel="stylesheet" type="text/css" href="style.css" /> 
      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> 
      <script src="jquery.countdown.packed.js" type="text/javascript"></script> 
      <script type="text/javascript"> 
       $(function() { 
        $('#countdown').countdown({until:$.countdown.UTCDate(-8, 2011, 1 - 1, 1), format: 'DHMS', layout: 
         '<div id="timer">' + '<hr />'+ 
          '<div id="timer_days" class="timer_numbers">{dnn}</div>'+ 
          '<div id="timer_hours" class="timer_numbers">{hnn}</div>'+ 
          '<div id="timer_mins" class="timer_numbers">{mnn}</div>'+ 
          '<div id="timer_seconds" class="timer_numbers">{snn}</div>'+ 
          '<div id="timer_labels">'+ 
           '<div id="timer_days_label" class="timer_labels">days</div>'+ 
           '<div id="timer_hours_label" class="timer_labels">hours</div>'+ 
           '<div id="timer_mins_label" class="timer_labels">mins</div>'+ 
           '<div id="timer_seconds_label" class="timer_labels">secs</div>'+ 
          '</div>'+       
         '</div>'      
        }); 
       }); 
      </script> 
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
     <title>Untitled Document</title> 
    </head> 
    <body> 
     <div id="countdown"></div> 
    </body> 
</html> 

这是导致

enter image description here

只显示零值,但不下来

+0

你确定jquery.countdown.packed.js实际上是加载到页面中吗? – Filip

+2

因为2011年1月1日已经过去了? – JJJ

回答

0

是您的,直到过去的日期算?该文件表示倒计时将显示全部为零,直到日期过去。