//计算倒计时 ,时间戳 id?
function jisuandaojishi(id , closeTime)
{
//var closeTime = endtime - currenttime;
var displayTime;
function showTime(){
var day = Math.floor(closeTime / (60 * 60 * 24));
var hour = Math.floor(closeTime / (3600)) - (day * 24);
var minute = Math.floor(closeTime / (60)) - (day * 24 * 60) - (hour * 60);
var second = Math.floor(closeTime) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
closeTime -= 1;
var html = day+'天'+hour+'小时'+minute+'分'+second+'秒';
jQuery('#'+id).html(html);
if(closeTime == -1)
{
clearInterval(displayTime);
document.location.href = document.location.href;
return;
}
}
showTime();
displayTime = setInterval(function(){
showTime();
}, 1000)
}