• <tfoot id='pxz1y'></tfoot>

    <small id='pxz1y'></small><noframes id='pxz1y'>

    <legend id='pxz1y'><style id='pxz1y'><dir id='pxz1y'><q id='pxz1y'></q></dir></style></legend>

    <i id='pxz1y'><tr id='pxz1y'><dt id='pxz1y'><q id='pxz1y'><span id='pxz1y'><b id='pxz1y'><form id='pxz1y'><ins id='pxz1y'></ins><ul id='pxz1y'></ul><sub id='pxz1y'></sub></form><legend id='pxz1y'></legend><bdo id='pxz1y'><pre id='pxz1y'><center id='pxz1y'></center></pre></bdo></b><th id='pxz1y'></th></span></q></dt></tr></i><div id='pxz1y'><tfoot id='pxz1y'></tfoot><dl id='pxz1y'><fieldset id='pxz1y'></fieldset></dl></div>

      <bdo id='pxz1y'></bdo><ul id='pxz1y'></ul>

        监听来自浏览器“查找"的事件JavaScript 中的窗

        时间:2023-09-04

        <tfoot id='ZxzTP'></tfoot>
      1. <legend id='ZxzTP'><style id='ZxzTP'><dir id='ZxzTP'><q id='ZxzTP'></q></dir></style></legend>
        • <bdo id='ZxzTP'></bdo><ul id='ZxzTP'></ul>

            <i id='ZxzTP'><tr id='ZxzTP'><dt id='ZxzTP'><q id='ZxzTP'><span id='ZxzTP'><b id='ZxzTP'><form id='ZxzTP'><ins id='ZxzTP'></ins><ul id='ZxzTP'></ul><sub id='ZxzTP'></sub></form><legend id='ZxzTP'></legend><bdo id='ZxzTP'><pre id='ZxzTP'><center id='ZxzTP'></center></pre></bdo></b><th id='ZxzTP'></th></span></q></dt></tr></i><div id='ZxzTP'><tfoot id='ZxzTP'></tfoot><dl id='ZxzTP'><fieldset id='ZxzTP'></fieldset></dl></div>
              <tbody id='ZxzTP'></tbody>

            <small id='ZxzTP'></small><noframes id='ZxzTP'>

                  本文介绍了监听来自浏览器“查找"的事件JavaScript 中的窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  有没有办法监听输入浏览器的查找"?JavaScript 中的窗口?

                  Is there a way to listen for typing into the browser's "find" window in JavaScript?


                  (来源:apple.com)

                  我希望能够从 JavaScript 重新解释搜索文本.我需要为什么添加事件侦听器?

                  I'd like to be able to reinterpret the search text from JavaScript. What do I need to add an event listener for?

                  推荐答案

                  我不知道有什么方法可以监听类似 find 的事件,如果任何浏览器都支持它肯定不是便携式解决方案.

                  I don't know of any way you can listen for a find-like event and if that's supported in any browser it sure isn't a portable solution.

                  我也不知道您要实现什么,但我认为您最好的选择是侦听触发查找窗口的键盘事件并在尝试模拟查找工具栏/窗口时尝试取消它们使用您自己的 JavaScript.然而,这是一项艰巨(几乎不可能)的任务,因为某些浏览器根据本地化自定义键盘快捷键(例如,在 IE 中,en-US 使用 Ctrl+F(用于 Find)而 pt-PT 使用 Ctrl+L(对于 Localizar,意思是查找).

                  I also don't know what you're trying to achieve but I think that your best option is to listen for the keyboard events that trigger the find window and attempt to cancel them while attempting to emulate the find-toolbar/window with JavaScript of your own. This is however a herculean (and nearly impossible) task due to some browsers customization of keyboard shortcuts depending on the localization (for instance, in IE, en-US uses Ctrl+F (for Find) while pt-PT uses Ctrl+L (for Localizar, meaning find)).

                  结论:我认为你不走运......

                  Conclusion: I think you're out of luck there...

                  这篇关于监听来自浏览器“查找"的事件JavaScript 中的窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:JavaScript 如何识别事件对象变量? 下一篇:JavaScript 中的保留函数名

                  相关文章

                  最新文章

                1. <legend id='w0Se6'><style id='w0Se6'><dir id='w0Se6'><q id='w0Se6'></q></dir></style></legend>
                2. <small id='w0Se6'></small><noframes id='w0Se6'>

                    1. <i id='w0Se6'><tr id='w0Se6'><dt id='w0Se6'><q id='w0Se6'><span id='w0Se6'><b id='w0Se6'><form id='w0Se6'><ins id='w0Se6'></ins><ul id='w0Se6'></ul><sub id='w0Se6'></sub></form><legend id='w0Se6'></legend><bdo id='w0Se6'><pre id='w0Se6'><center id='w0Se6'></center></pre></bdo></b><th id='w0Se6'></th></span></q></dt></tr></i><div id='w0Se6'><tfoot id='w0Se6'></tfoot><dl id='w0Se6'><fieldset id='w0Se6'></fieldset></dl></div>
                        <bdo id='w0Se6'></bdo><ul id='w0Se6'></ul>
                      <tfoot id='w0Se6'></tfoot>