开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜