开发者

Auto refresh on specific pages and with constant time of 5 sec

开发者 https://www.devze.com 2023-02-16 21:27 出处:网络
I have 3 file as following : output-xml.php phpsqlajax_map.htm da开发者_Python百科tabase.php In order to get the latest information on phpsqlajax_map.htm, I have to refresh \"3\" and then no \"1\"

I have 3 file as following :

  1. output-xml.php
  2. phpsqlajax_map.htm
  3. da开发者_Python百科tabase.php

In order to get the latest information on phpsqlajax_map.htm, I have to refresh "3" and then no "1" first. For user,thy will only open phpsqlajax_map.htm, while 1 and 3 only work behind the system.

What I want to ask is, how to write a javascript in order to make 1 and 3 refresh automatically in every 5 second and " even without opening it out ". Hope u all understand my poor english.


You could use the window.setInterval function which allows you to execute some custom javascript method at regular intervals. This method could send an AJAX request and refresh the corresponding DOM element.

0

精彩评论

暂无评论...
验证码 换一张
取 消