跳转到下一个可搜索文本。
我致力于开发生物信息学程序的包装器。 该程序的输出相当长(如果打印的话有几十页),但结构分为几个部分。
我想添加“下一个”和“上一个”部分按钮,以方便在输出中上下跳跃。
实现此目的的一种方法是解析完整的输出,添加“id”或“name”锚点并使用 类型链接链接到相邻部分。然而,这样做很麻烦,增加了新错误的可能性,并且会减慢显示速度。
所有部分都“以相同的方式”开始(即,如果您使用 Control-F 搜索特定文本,您将跳转到下一部分)。有没有一种简单的方法可以利用所有部分都以相同文本开头的事实来添加链接,让您跳转到下一个部分?
干杯
I contribute to develop a wrapper for a bioinformatics program.
The program's output is quite long (dozens of pages if printed), but structured into sections.
I would like to add "next" and "previous" section buttons to facilitate jumping up and down in the output.
One way of doing this would involve parsing the complete output, adding "id" or "name" anchors and linking to neighboring sections using <a href="#section2">
type links. However, thats a pain in the butt to do, adds the potential of new bugs, and would slow down the display.
All sections start "in the same manner" (ie. if you control-F search for a specific text, you will jump to the next section). Is there an easy way of using the fact that all sections start with the same text to add links that will let you jump to the next one?
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许 jQuery ScrollTo 插件 可以帮助你。您可以在页面加载后添加通过 Javascript/jQuery 导航所需的链接。
Perhaps the jQuery ScrollTo plugin can help you. You could add the links you need for navigating by Javascript/jQuery after the page has loaded.