跳转到没有锚点的网站字符串

问题描述 投票:-3回答:1

是否有可能(可能使用JavaScript)通过网站上的链接跳至特定的句子(字符串)?

类似于锚,仅在HTML中没有锚。

这是来自搜索结果的示例,搜索字符串为“内容目录”:

Result: <a href="https://aaa.de/sss/planets/">planets/</a> on line 20: <br>
If you create a folder within the content directory (e.g. <code class="hljs lua">content/<span class="hljs-built_in">sub</span></code>) and...

打开链接后,浏览器应该跳到这一行(该行号当然只是搜索到的文本文件中的那个。)并且希望为搜索字符串加上颜色。

javascript html anchor
1个回答
0
投票

我发现了一些有用的脚本:http://www.seabreezecomputers.com/tips/find6.htm它提供了一个侧面搜索按钮

© www.soinside.com 2019 - 2024. All rights reserved.