日期:2014-05-17 浏览次数:20592 次
function DigitalTime1(deadline,obj)
{
deadline= new Date(deadline);
var now = new Date();
var diff = -480 - now.getTimezoneOffset() //是北京时间和当地时间的时间差
var leave = (deadline.getTime() - now.getTime()) + diff*60000
var day = Math.floor(leave / (1000 * 60 * 60 * 24))
var hour = Math.floor(leave / (1000*3600)) - (day * 24)
var minute = Math.floor(leave / (1000*60)) - (day * 24 *60) - (hour * 60)
var second = Math.floor(leave / (1000)) - (day * 24 *60*60) - (hour * 60 * 60) - (minute*60)
var strResult ="距结束还有";
if(leave