Refresh a PHP page for every predefined seconds

后端 未结 6 1039
一个人的身影
一个人的身影 2021-01-26 17:06

I would like to load/refresh a particular page for every 10 secs to view updated data\'s fetched from Database.

I used META for doing it

 

        
6条回答
  •  不思量自难忘°
    2021-01-26 17:31

    With jQuery you can do it):

    var seconds = 10;
    var id = setInterval(function()
    {
         $('#container').load('whatever.php');
    }, 1000*seconds);
    

    :)

提交回复
热议问题