我正在使用基思伍德jquery倒计时插件来表示我即将推出的页面,我想添加7天10小时40分钟的倒计时。您可以在此处找到更多信息 http://keith-wood.name/countdown.html
这是我的代码:
function countdown () {
// src: http://keith-wood.name/countdown.html
layout = $('.timer').html();
var newYear = new Date();
newYear = new Date(newYear.getDate() + 7, 1 - 1, 1);
$('.timer').countdown({until: newYear, layout: layout});
}
提前感谢!
使用以下代码:
function countdown () {
layout = $('.timer').html();
date = new Date("2016-05-20T13:00:00");
var d = new Date(0);
d.setUTCSeconds(date);
$('.timer').countdown({until: date, layout: layout});
}