redirect to another page with anchor tag in php

I am trying to echo a URL with anchor tag on the backend page after the script is run which should take to that page and to that location of that page where anchor is placed.

After the form submission it takes to script page where at the end the code is:

echo "<meta http-equiv='refresh' content='0;url=finalpage.php#submitted' />";

I have place the anchor on finalpage.php which is way down to header and i want that it should directly take to that anchor:

<a name="submitted"></a>

The page do refresh taking to finalpage.php, but it takes to the header and not where the anchor tag is.

I tried with Location(header:..), die(...), but not working

Please help!


你有没有尝试设置锚点的id属性,而不是名称?

<a id="submitted"></a>

url哈希组件着重于它在页面加载时的元素

链接地址: http://www.djcxy.com/p/12416.html

上一篇: 选择<a>哪个href以某个字符串结尾

下一篇: 在PHP中使用锚点标记重定向到另一个页面