gpt4 book ai didi

html - 如何在html中获取书签的页码

转载 作者:行者123 更新时间:2023-11-28 03:18:39 25 4
gpt4 key购买 nike

我在 html 文档中有多个书签。我正在尝试创建指向这些书签的链接。链接绝对没问题。我还需要提及书签的页码。

下面是代码。

<a href="#bookmark1">PAGE_NUMBER</a>

如何获取书签位置 PAGE_NUMBER 的值?

最佳答案

Add one id in a tag. and use this code

<a href="#bookmark1" id="idaa">PAGE_NUMBER</a>

$('#idaa').html();

关于html - 如何在html中获取书签的页码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45323099/

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