如何自动刷新网页. [英] how to refresh a web page automatically.

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

问题描述

我使用了以下代码,但是不起作用

i had used the following code,but it is not working

<head>
    <title>Untitled Page</title>
    <meta http-equiv="refresh" content="10"/>
</head>
<meta id="RefreshPeriod" runat="server" http-equiv="refresh" content="10" />
<style type="text/css">


Response.AppendHeader("refresh", "5");

推荐答案

使用
<meta http-equiv="Refresh" content="n;url"/>


其中,n是秒数,而url是要刷新的URL.如果不使用URL,则页面会自动刷新.


where n is the number of seconds, and url is the URL to refresh to. If you leave the URL off, then the page refreshes itself.

<meta http-equiv="refresh" content="8;url=http://abc.xyz/>



其中"8"是指刷新页面之前经过的秒数;
"url"是新的URL重定向到.可以排除它,这意味着将重新加载当前页面.

参考链接:-自动刷新ASP.NET网页 [



where ''8'' refers to the number of seconds that will elapse before the page is refreshed;
''url'' is the new url redirect to. It can be excluded which means the current page will be reloaded.

Reference Link :- Auto-refreshing ASP.NET web pages[^]


http://www.aspnetsource.com/blog/post-automatic-refresh-pa.html [^ ]
http://tuvian.wordpress.com /2011/07/25/how-to-refresh-page-using-javascript-freaquently-and-automatically/ [
http://www.aspnetsource.com/blog/post-automatic-refresh-pa.html[^]
http://tuvian.wordpress.com/2011/07/25/how-to-refresh-page-using-javascript-freaquently-and-automatically/[^]


使用META Refresh或Javascript Settimeout,请检查这些
在一定间隔后自动刷新页面 [
Use META Refresh or Javascript Settimeout, check these
Automatically refresh page after some interval[^]


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

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