gpt4 book ai didi

javascript - 答案或评论链接如何工作(stackoverflow,维基百科)?

转载 作者:行者123 更新时间:2023-12-01 06:42:50 24 4
gpt4 key购买 nike

Stackoverflow 允许评论或答案链接。这意味着它允许您创建指向特定答案或帖子评论的链接。

我的问题是它如何将浏览器拖动到该特定帖子

我知道他们使用 id 来表示特定的评论或帖子。

使用哪种技术或技巧来创建这样的东西?

我在meta.stackexchange.com上浏览了一些帖子,但它没有回答用于创建它的技巧或技术?

最佳答案

Anchors (或 <a /> 标签)带有片段和元素 ID。

<!-- <a> element links to the section below -->
<p><a href="#Section_further_down">
Jump to the heading below
</a></p>

<!-- Heading to link to -->
<h2 id="Section_further_down">Section further down</h2>

关于javascript - 答案或评论链接如何工作(stackoverflow,维基百科)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61686387/

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