Thursday, May 28, 2020

Get Realtime Date and Time

During the development of my project, I wanted to get the RealTime date and time to user. Code is as under: var myVar=setInterval(function () {showTime()}, 1000); var counter = 0; function showTime() { var date = new Date(); document.getElementById("time").innerHTML = date; span id="time" Time is most powerful thing. Regards Deepak Pandey

No comments:

Post a Comment