gpt4 book ai didi

html - 两个页面上的相同 anchor ID : How to link from one page to the anchor on the other page

转载 作者:太空宇宙 更新时间:2023-11-04 13:15:13 25 4
gpt4 key购买 nike

我有两个网站 page1 和 page2。在每个页面上都有一个下载表单,我可以通过 anchor ID #DownloadForm 访问它。

在第 1 页上,我想创建一个指向第 2 页上的下载表单的链接。我认为这会起作用:

<a href="/page2#DownloadForm"></a>

但是(在 Chrome 中)单击此链接时,它会将我带到第 1 页上的下载表单。就好像 anchor 表达式首先被评估,然后 href 的其余部分被忽略。

顺便说一句:我正在使用 Wordpress,但我想这与这里无关。

如果有人给我提示,我将不胜感激!

最佳答案

您是否尝试过整页 uri?我试过了,它在 chrome 和 firefox 中对我有用。

<a href="/page2.html#DownloadForm"></a>

关于html - 两个页面上的相同 anchor ID : How to link from one page to the anchor on the other page,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28221433/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com