xingyue1988

1.定义一个显示时间的位置

<div id="shijian">
                  
              </div>

2.jquery代码

function showTime() {
                var curTime = new Date();
                $("#shijian").html(curTime.toLocaleString());
                setTimeout("showTime()", 1000);
                 }
                    $(function(){
                        showTime()
                    })

 

分类:

技术点:

相关文章:

  • 2021-09-04
  • 2021-09-21
  • 2021-12-06
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-21
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2021-06-22
  • 2021-12-25
  • 2021-12-06
相关资源
相似解决方案