< script type="text/ javascript"> setInterval(function(){ var time = new Date().format("hh:mm:ss"); var date = new Date( ).format("yyyy -MM-dd"); document.getElementById("Time").innerHTML=time; document.getElementById("Date").innerHTML=date; }, 1000);