2017-09-06 93 views
0

我正在使用我的網站a Modern Circular jQuery Countdown Timer Plugin並且它沒有更新時間戳。當我刷新頁面時,時間從開始重新開始,但我需要用當前時間設置時間,並且它自己刷新它,並從當前時間倒數到結束時間。JQUERY添加時間戳格式的更新時間

我只需要簡單的倒計時。有結束日期,例如9月12日上午9:00,它從當前日期和時間倒數。 現在我需要例如9月4日成立,並倒數至9月12日上午9:00

這是Jquery的

$('.countdown').final_countdown({ 
    'start': 1503904446, 
    'end': 1506492000, 
    'now': 1503904446, 
    }, function() { 
     alert('end'); 
}); 
+0

檢查應該工作答案爲你 –

回答

0

試試這個:

$('.countdown').final_countdown({ 
    'start': 1503904446, 
    'end': new Date().getTime(), 
    'now': 1503904446, 
    }, function() { 
     alert('end'); 
}); 
+0

你確定嗎?結束日期不能是當前時間 –

+0

您提到'但我需要設置結束時間與當前時間' –

+0

oops,編輯我的問題 –