浏览器中有搜索/查找事件吗?
我正在构建一个不可滚动、固定布局的网站,但像往常一样,非常规网站往往存在短缺。页面中有一个可滚动的新闻元素,它可以通过鼠标滚轮上下滚动 div 容器的 div 子元素。当有人尝试在页面中搜索时,按 CTRL+F 并且内容超出了视口(未滚动到视图中),问题就出现了。是否有任何常见事件可以处理浏览器内的查找/搜索?
I'm in the middle of building a not scrollable, fixed layout website, but as usual, non conventional websites tend to have shortages. There is a scrollable news element in the page, which scrolls a div container's div childs up and down by the mousewheel. The problem arises, when someone tries to search in the page, pressing CTRL+F and the content is out of the viewport (not scrolled into view). Is there any common event, which handles the find/search inside browsers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对此并不完全确定,但我不认为 DOM 具有任何在使用搜索时触发的事件,并且它是您无法挂钩的浏览器功能。
http://en.wikipedia.org/wiki/DOM_events
Im not completely certain about this, but I dont think DOM has any events that fire when a uses searches and that it a browser function that you can not hook on.
http://en.wikipedia.org/wiki/DOM_events