How to reload JSON with AJAX every 10 Seconds

后端 未结 4 1993
小蘑菇
小蘑菇 2021-02-06 06:55

I\'m trying to reload a JSON file every 10 seconds with JQUERY.

The page is here: http://moemonty.com/chirp/chirp.html

The Code is here:



        
4条回答
  •  清歌不尽
    2021-02-06 07:22

    You should definitely use:

    setInterval("loadChirp", 10000):

    Don't write loadCrirp() inside setInterval as we're only passing a refrence

提交回复
热议问题