定期刷新网页 [英] Refresh WebPage periodically

查看:106
本文介绍了定期刷新网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是我有一个.php页面,必须根据数据库中的数据显示一些图表/数据。我希望自动和定期刷新页面,以便可以更新图表/数据,因为数据仅在页面加载时获得。我怎样才能做到这一点?

My requirement is that i have a .php page that has to display some graphs/data based on data from a database. I would like refresh the page automatically and periodically so that graphs/data can be updated, as the data is obtained only on loading of the page. How can i do this ?

推荐答案

也许你可以尝试setTimeout javascript方法

Maybe you can try the setTimeout javascript method

setTimeout("location.reload(true);",timeoutPeriod);

这会在每个timeoutPeriod时间间隔刷新页面。

this would refresh the page on every timeoutPeriod interval.

这篇关于定期刷新网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆