开发者

Need a help with jquery script

i am doing a count down from the current server 开发者_C百科time until a specified time , at the moment the script is static when the visitor enter the web site he sees the timer counting down lets say from 1 day 20 hours 11 mins and 10 seconds and when refresh he starts counting down from the same value . here is the script

<script>
jQuery(document).ready(function(){
$('#countdown_dashboard').countDown({
serverDate: {
'day':   20,
'month':  9,
'year':  2011,
'hour':  24,
'min':   0,
'sec':   0,
'serverDay':   11,    # current server day
'serverMonth':  9,    # current server month  
'serverYear':  2011,  # current server year
'serverHour':  19,    # current server hour
'serverMin':   10,    # current server min
'serverSec':   08     # current server second
},
omitWeeks: true
});
});
</script>

i need you to put the currunt time of server in day and month and year and hour and min and sec into variable so i can put them above in order not to make the visitor see the same timer happens again and again with no chnage

* the server side language is PHP


add until

<script>
jQuery(document).ready(function(){
$('#countdown_dashboard').countDown({
serverDate: {
'day':   20,
'month':  9,
'year':  2011,
'hour':  24,
'min':   0,
'sec':   0,
'serverDay':   11,    # current server day
'serverMonth':  9,    # current server month  
'serverYear':  2011,  # current server year
'serverHour':  19,    # current server hour
'serverMin':   10,    # current server min
'serverSec':   08     # current server second
},
omitWeeks: true
}, 
until: new Date(2012, 8 - 1, 8));
});
</script>

insert desired js date object instead...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜