使用元标记自动刷新 HTML 中的代码

发布于 2024-12-24 17:20:08 字数 269 浏览 7 评论 0原文

我正在尝试刷新同一页面,但它不起作用。这是我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

以为你会在 2024-12-31 17:20:08

看起来您可能使用浏览器无法识别的双引号来粘贴此内容(或使用像 MS Word 这样的文字处理程序)。请检查您的代码是否使用了实际的双引号,例如 ",它与以下字符不同:

将元标记替换为此标记,然后重试:

<meta http-equiv="refresh" content="5" >

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:

<meta http-equiv="refresh" content="5" >
静水深流 2024-12-31 17:20:08

您正在使用智能引号。也就是说,您使用的是大引号 (),而不是标准引号 (")。 Microsoft Word 和其他文字处理程序会自动发生这种情况,以使内容看起来更漂亮,但它也会破坏 HTML。请确保在纯文本编辑器中进行编码,例如记事本或 Notepad2

<html>
  <head>
    <title>HTML in 10 Simple Steps or Less</title>
    <meta http-equiv="refresh" content="5"> <!-- See the difference? -->
  </head>
  <body>
  </body>
</html>

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.

<html>
  <head>
    <title>HTML in 10 Simple Steps or Less</title>
    <meta http-equiv="refresh" content="5"> <!-- See the difference? -->
  </head>
  <body>
  </body>
</html>
谎言月老 2024-12-31 17:20:08

您使用的引号是问题所在:

<meta http-equiv=”refresh” content=”5" >

您应该使用 "

<meta http-equiv="refresh" content="5">

The quotes you use are the issue:

<meta http-equiv=”refresh” content=”5" >

You should use the "

<meta http-equiv="refresh" content="5">
成熟稳重的好男人 2024-12-31 17:20:08
<meta http-equiv="refresh" content="600; url=index.php">

600 是刷新周期之间的秒数。

<meta http-equiv="refresh" content="600; url=index.php">

600 is the amount of seconds between refresh cycles.

你的心境我的脸 2024-12-31 17:20:08

试试这个:

<meta http-equiv="refresh" content="5;URL= your url">

<meta http-equiv="refresh" content="5">  

Try this:

<meta http-equiv="refresh" content="5;URL= your url">

or

<meta http-equiv="refresh" content="5">  
只等公子 2024-12-31 17:20:08

试试这个标签。这将每 30 秒刷新一次 index.html 页面。

<meta http-equiv="refresh" content="30;url=index.html">

Try this tag. This will refresh the index.html page every 30 seconds.

<meta http-equiv="refresh" content="30;url=index.html">
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文