js实现时钟。

<div ></div>

<script type="text/javascript">

  function ChangeClock()

    {

      var time=new Date();

      document.getElementById("clock").innerHTML="当前时间:"+time.getFullYear()+"年"+(time.getMonth()+1)+"月"+time.getDate()+"日 "+time.getHours()+":"+time.getMinutes()+":"+time.getSeconds();

    }

      window.setInterval(ChangeClock,1000);

</script>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2022-01-04
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-27
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-06-27
相关资源
相似解决方案