使用元标记自动刷新 HTML 中的代码
我正在尝试刷新同一页面,但它不起作用。这是我的 HTML 代码:
<html>
<head>
<title>HTML in 10 Simple Steps or Less</title>
<meta http-equiv=”refresh” content=”5" />
</head>
<body>
</body>
</html>
I'm trying to refresh the same page but it isn't working. This is my HTML code:
<html>
<head>
<title>HTML in 10 Simple Steps or Less</title>
<meta http-equiv=”refresh” content=”5" />
</head>
<body>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
看起来您可能使用浏览器无法识别的双引号来粘贴此内容(或使用像 MS Word 这样的文字处理程序)。请检查您的代码是否使用了实际的双引号,例如
"
,它与以下字符不同:”
将元标记替换为此标记,然后重试:
It looks like you probably pasted this (or used a word processor like MS Word) using a kind of double-quotes that are not recognized by the browser. Please check that your code uses actual double-quotes like this one
"
, which is different from the following character:”
Replace the meta tag with this one and try again:
您正在使用智能引号。也就是说,您使用的是大引号 (
”
),而不是标准引号 ("
)。 Microsoft Word 和其他文字处理程序会自动发生这种情况,以使内容看起来更漂亮,但它也会破坏 HTML。请确保在纯文本编辑器中进行编码,例如记事本或 Notepad2。You're using smart quotes. That is, instead of standard quotation marks (
"
), you are using curly quotes (”
). This happens automatically with Microsoft Word and other word processors to make things look prettier, but it also mangles HTML. Make sure to code in a plain text editor, like Notepad or Notepad2.您使用的引号是问题所在:
您应该使用
"
The quotes you use are the issue:
You should use the
"
600 是刷新周期之间的秒数。
600 is the amount of seconds between refresh cycles.
试试这个:
或
Try this:
or
试试这个标签。这将每 30 秒刷新一次
index.html
页面。Try this tag. This will refresh the
index.html
page every 30 seconds.