Run JavaScript function at regular time interval

前端 未结 4 438
悲哀的现实
悲哀的现实 2020-11-28 13:02

I am currently building a website to host software. What I want is to add to the project pages is a slideshow of screenshots cycling, changing images about every 5 seconds.

4条回答
  •  感情败类
    2020-11-28 14:08

    It Changes the date time in a div and time changes frequently after 1 sec.

        setInterval(function(){
          var date=new Date();
          $('.class').html(date);
        },1000);
    

提交回复
热议问题