var time = new Date(); h = time.getHours(); m = time.getMinutes(); document.getElementById("hour").innerHTML = h; document.getElementById("min").innerHTML = m;