【问题标题】:How to set 7 days countdown to keith-wood Jquery Countdown Plugin如何为 keith-wood Jquery Countdown Plugin 设置 7 天倒计时
【发布时间】:2016-06-17 00:15:03
【问题描述】:

我正在为即将推出的页面使用 keith Wood 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}); 

}

提前致谢!

【问题讨论】:

    标签: jquery jquery-countdown


    【解决方案1】:

    使用此代码:

    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}); 
    
    
    }
    

    【讨论】:

      猜你喜欢
      • 2023-03-08
      • 1970-01-01
      • 2023-03-15
      • 2016-08-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多