<script>
function get_time() {
var date = new Date();
var year = "", month = "", day = "", week = "", hour = "", minute = "", second = "";
year = date.getFullYear();
month = add_zero(date.getMonth() + 1);
day = add_zero(date.getDate());
hour = add_zero(date.getHours());
minute = add_zero(date.getMinutes());
second = add_zero(date.getSeconds());
document.getElementById("showSysDatetime").innerHTML = " " + year + "-"
+ month + "-" + day + " " + hour + ":" + minute + ":" + second;
}
function add_zero(temp) {
if (temp < 10)
return "0" + temp;
else
return temp;
}
setInterval("get_time()", 1000);
window.onload = get_time;
</script>