元页面刷新不适用于 php 页面?
我正在尝试将未启用 javascript 的用户重定向到我们的帮助页面 (help.php),特别是谈论启用 javascript 的部分 (help.php#nojavascript)。
但是,我的元刷新不起作用!它不断刷新同一页面!我尝试重定向到带有 .html
扩展名的不同页面,这有效,那么为什么这不起作用呢?
...
</script>
<!-- if user doesn't have JS enabled, take them to help page -->
<noscript>
<meta http-equiv="Refresh" content="3;url=help.php" />
</noscript>
</head>
...
i am trying to redirect users without javascript enabled to our help page (help.php), specifically the part that talks about enabling javascript (help.php#nojavascript).
however, my meta refresh is not working! it keeps on refreshing the same page! i tried redirecting to a different page with a .html
extension instead, and that works, so why doesn't this work?
...
</script>
<!-- if user doesn't have JS enabled, take them to help page -->
<noscript>
<meta http-equiv="Refresh" content="3;url=help.php" />
</noscript>
</head>
...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试使用绝对路径:
Try to use an absolute path:
一方面,尝试将其从 NOSCRIPT 元素中取出。启用脚本的浏览器应该忽略 NOSCRIPT 中的所有内容。
For one thing, try taking it out of the NOSCRIPT element. Browsers with scripting enabled are supposed to ignore everything inside NOSCRIPT.
我包含了一个将用户重定向到 home.php =( 抱歉!
i was including a file that redirected the user to home.php =( sorry!