xingyue1988

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

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

2.jquery代码

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

 

分类:

技术点:

相关文章: