元刷新不适用于 mozilla 和 IE
Meta-refresh doesnt work on mozilla and IE
我有一个页面,我每隔 x 秒刷新一次以在数据库中找到一些东西,当它发现我想重定向到另一个页面时。
我用它来重定向我的页面:
echo "<meta http-equiv='refresh' content=1;url='login.html'>";
但这在 mozilla 和 IE 中都不起作用。
谁能帮帮我? (如果您需要任何其他信息来帮助我,我可以提供)
根据 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta 上的文档,您正在寻找的 HTML 是:
<meta http-equiv="refresh" content="1;url=http://localhost/bn/login.html">
这将在 1 秒后将用户重定向到 http://website.com/login.html
。
重要的更新是 content
属性的引号,以及指令的 url=
部分的完整 URL。
在 PHP 中回应这几乎是相同的:
echo '<meta http-equiv="refresh" content="1;url=http://localhost/bn/login.html">';
我有一个页面,我每隔 x 秒刷新一次以在数据库中找到一些东西,当它发现我想重定向到另一个页面时。
我用它来重定向我的页面:
echo "<meta http-equiv='refresh' content=1;url='login.html'>";
但这在 mozilla 和 IE 中都不起作用。
谁能帮帮我? (如果您需要任何其他信息来帮助我,我可以提供)
根据 https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta 上的文档,您正在寻找的 HTML 是:
<meta http-equiv="refresh" content="1;url=http://localhost/bn/login.html">
这将在 1 秒后将用户重定向到 http://website.com/login.html
。
重要的更新是 content
属性的引号,以及指令的 url=
部分的完整 URL。
在 PHP 中回应这几乎是相同的:
echo '<meta http-equiv="refresh" content="1;url=http://localhost/bn/login.html">';