<html>
<head>
<script type="text/javascript">
function startTime()
{
var today=new Date()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
m=checkTime(m)
s=checkTime(s)
document.getElementById('txt').innerHTML=h+":"+m+":"+s
t=setTimeout('startTime()',500)
}

function checkTime(i)
{
if (i<10)
  {i="0" + i}
  return i
}
</script>
</head>

<body onload="startTime()">
<div ></div>
</body>
</html>

相关文章:

  • 2021-11-19
  • 2021-12-14
  • 2021-10-13
  • 2022-02-13
  • 2021-07-01
  • 2021-10-05
  • 2022-01-09
猜你喜欢
  • 2022-01-30
  • 2021-12-26
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-23
相关资源
相似解决方案