浏览器CTRL-F查找和不可见的文本 [英] browser ctrl-f find and non-visible text

查看:197
本文介绍了浏览器CTRL-F查找和不可见的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能的CONTRL + F浏览器功能来查找文本与在弹出窗口中的文字进行整合。

Can the browser feature of contrl+F to find text be integrated with text in popup windows.

我想有当有人悬停在网页中的种名给予一定的科学依据的信息。生成弹出,提示风格的文本是没有问题的,问题是,用Ctrl + F任何人都无法找到它,或者,如果我定位文本拿出来看不需要时,它会被发现,但不可见。

I'd like to have some scientific reference information given when someone hovers over a species name in a web page. Generating the popup, tooltip style text is no problem, the problem is that anyone using Ctrl+F won't be able to find it, or if I position the text out of view when not required, it will be found but be invisible.

相同的排序效果适用于手风琴式的扩大文本区域。

The same sort of effect applies to "accordion" style expanding text areas.

我在寻找某种事件时产生的发现是突出的结果。

I'm looking for some sort of event generated when find is highlighting a result.

推荐答案

不幸的是,没有这样的事件,你不能干扰内置的发现。

Unfortunately there is no such event, you can't interfere with the built-in find.

关于您可以在这种情况下做的最好的是提供页您自己的搜索功能,搜索包含给定文本的文本节点的DOM,突出了他们,打开了他们所在的任何封闭的手风琴。

About the best you can do in this case is to provide your own search function in-page, which searches the DOM for Text nodes containing the given text, highlights them, and opens up any closed accordions they're in.

这篇关于浏览器CTRL-F查找和不可见的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆