function getDateTime() {
var dateResult;
var date = new Date();
var year = date.getFullYear();
var month = parseInt(date.getMonth(), 10) + 1;
month = month > 9 ? month : "0" + month;
var dates = date.getDate();
dates = dates > 9 ? dates : "0" + dates;
var seconds = date.getSeconds();
seconds = seconds > 9 ? seconds : "0" + seconds;
var minutes = date.getMinutes();
minutes = minutes > 9 ? minutes : "0" + minutes;
var hours = date.getHours();
hours = hours > 9 ? hours : "0" + hours;
dateResult = year + "-" + month + "-" + dates + " "
+ hours + ":" + minutes + ":" + seconds;
return dateResult;
};
$("#time").html(getDateTime());
setTimeout(function() {
$("#time").html(getDateTime())
setTimeout(arguments.callee, 0);
}, 0);
var dateResult;
var date = new Date();
var year = date.getFullYear();
var month = parseInt(date.getMonth(), 10) + 1;
month = month > 9 ? month : "0" + month;
var dates = date.getDate();
dates = dates > 9 ? dates : "0" + dates;
var seconds = date.getSeconds();
seconds = seconds > 9 ? seconds : "0" + seconds;
var minutes = date.getMinutes();
minutes = minutes > 9 ? minutes : "0" + minutes;
var hours = date.getHours();
hours = hours > 9 ? hours : "0" + hours;
dateResult = year + "-" + month + "-" + dates + " "
+ hours + ":" + minutes + ":" + seconds;
return dateResult;
};
$("#time").html(getDateTime());
setTimeout(function() {
$("#time").html(getDateTime())
setTimeout(arguments.callee, 0);
}, 0);