Answers for "time in website"

0

time in website

function display_c(){
   var refresh=1000; // Refresh rate in milli seconds
   mytime=setTimeout('display_ct()',refresh)
}

function display_ct() {
  var CDate = new Date()
  var NewDate=CDate.toDateString(); 
  NewDate = NewDate + " - " + CDate.toLocaleTimeString();
  document.getElementById('ct').innerHTML = NewDate;
  display_c();
}
Posted by: Guest on July-28-2021
0

time in website

<html>
<head> </head>

<body onload=display_ct();>
  <span id='ct' ></span>
</body>
</html>
Posted by: Guest on July-28-2021

Code answers related to "time in website"

Code answers related to "Javascript"

Browse Popular Code Answers by Language