How to send Ajax request on every 1s using JQuery?

后端 未结 5 1478
独厮守ぢ
独厮守ぢ 2021-01-03 06:43

How to send Ajax request on every 1s using JQuery ?

5条回答
  •  迷失自我
    2021-01-03 07:30

    you can use setInterval, but setInterval ist not part of jQuery:

    setInterval(function() {
        $.get(...);
    }, 1000);
    

提交回复
热议问题