2013-04-14 127 views
0

我有這一塊的JavaScript代碼,我是從網上得到,我想修改ITTO倒計時7月10日2013年jQuery的倒計時日期

var currentDate = new Date(); 
$('div#clock').countdown(45 * 40 * 30 * 30 * 1000 + currentDate.valueOf(), function(event) { 

enter image description here

2013年7月10日約100所以我希望日子顯示100.我不明白如何通過日期的格式,我已經嘗試過,但它仍然無法正常工作。我試着給它傳遞一個新的Date對象,但這也不起作用。此代碼似乎來自jQuery countdown library

回答

0

而不是 「45 * 40 * 30 * 30 * 1000」 使用 「100 * 24 * 60 * 60 * 1000」,以便:

var currentDate = new Date(); 
$('div#clock').countdown(45 * 40 * 30 * 30 * 1000 + currentDate.valueOf(), function(event) { 

將是最後的代碼。即1000(毫秒/秒)* 60(秒/分鐘)* 60(分鐘/小時)* 24(小時/天)* 100(天)。