设置时间倒计时器jquery

如何使用Javascript在倒计时中设置EST时间。 我正在使用以下代码并能够设置小时倒计时,但我需要一个特定的时间
http://www.timeanddate.com/countdown/generic?iso=20130920T1730&p0=152/

var now = new Date(); BigDay = new Date("September20,2013"); var countTo=BigDay.getTime() $('.timer').countdown(countTo, function(event) { var $this = $(this); switch(event.type) { case "seconds": case "minutes": case "hours": case "days": case "weeks": case "daysLeft": $this.find('span.'+event.type).html(event.value); break; case "finished": $this.hide(); break; } }); 

这是否与您所寻找的一致? 首先,一些HTML:

     

然后,一些Javascript(与jQuery一起!):

 setInterval(function(){ // set whatever future date / time you want here, together with // your timezone setting... var future = new Date("Sep 20 2014 21:15:00 GMT+0200"); var now = new Date(); var difference = Math.floor((future - now) / 1000); var seconds = fixIntegers(difference % 60); difference = Math.floor(difference / 60); var minutes = fixIntegers(difference % 60); difference = Math.floor(difference / 60); var hours = fixIntegers(difference % 24); difference = Math.floor(difference / 24); var days = difference; $("#seconds").text(seconds + "s"); $("#minutes").text(minutes + "m"); $("#hours").text(hours + "h"); $("#days").text(days + "d"); }, 1000); function fixIntegers(integer) { if (integer < 0) integer = 0; if (integer < 10) return "0" + integer; return "" + integer; } 

我希望这是有道理的! 如果你想看到现场版本的实际应用,那么这是一个小提琴 。

您还可以使用jQuery查看此倒计时器