如何每隔一段时间自动刷新网页 [英] How to refresh a web page automatically every specified period of time
本文介绍了如何每隔一段时间自动刷新网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用asp.net开发一个网站,并且我希望我的一个网页在请求时每隔5秒刷新一次;我可以添加一个 meta
标签
从维基百科:
在5秒钟后放置页面以刷新页面
:
< meta http-equiv =refreshcontent =5/>
重定向到 http://example.com/ 在
5秒后:
< meta http- equiv =refreshcontent =5; url = http://example.com//>
重定向到 http://example.com/
立即:
< meta http-equiv = refreshcontent =0; url = http://example.com//>
另请参阅 w3schools
I am using asp.net to develop a website, and I want one of my web pages to refresh every 5 seconds when requested; how can I achieve that?
解决方案
Can you add a meta
tag to the page's header?
From wikipedia:
Place inside to refresh page after 5 seconds:
<meta http-equiv="refresh" content="5" />
Redirect to http://example.com/ after 5 seconds:
<meta http-equiv="refresh" content="5;url=http://example.com/" />
Redirect to http://example.com/ immediately:
<meta http-equiv="refresh" content="0;url=http://example.com/" />
Also see w3schools
这篇关于如何每隔一段时间自动刷新网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文