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

      • <bdo id='Hy8uo'></bdo><ul id='Hy8uo'></ul>

      1. <legend id='Hy8uo'><style id='Hy8uo'><dir id='Hy8uo'><q id='Hy8uo'></q></dir></style></legend><tfoot id='Hy8uo'></tfoot>
        <i id='Hy8uo'><tr id='Hy8uo'><dt id='Hy8uo'><q id='Hy8uo'><span id='Hy8uo'><b id='Hy8uo'><form id='Hy8uo'><ins id='Hy8uo'></ins><ul id='Hy8uo'></ul><sub id='Hy8uo'></sub></form><legend id='Hy8uo'></legend><bdo id='Hy8uo'><pre id='Hy8uo'><center id='Hy8uo'></center></pre></bdo></b><th id='Hy8uo'></th></span></q></dt></tr></i><div id='Hy8uo'><tfoot id='Hy8uo'></tfoot><dl id='Hy8uo'><fieldset id='Hy8uo'></fieldset></dl></div>
      2. 处理 z-index'd 图层上的点击事件

        时间:2023-09-06

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

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

              <bdo id='uUhEh'></bdo><ul id='uUhEh'></ul>
              <legend id='uUhEh'><style id='uUhEh'><dir id='uUhEh'><q id='uUhEh'></q></dir></style></legend>
                    <tbody id='uUhEh'></tbody>
                1. 本文介绍了处理 z-index'd 图层上的点击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在构建的地图应用程序中有 2 个 z-index 图层.当我单击要放大的图层时遇到问题.单击处理程序位于底层 z-index 图层上,我不希望在单击覆盖图层中的控件时触发它.

                  I have 2 z-index layers in a map application I'm building. I have a problem when I click on the layers to zoom in. The click handler is on the underlying z-index layer and I don't want it to fire when a control in the overlying layer is clicked.

                  我遇到的问题是,无论如何都会引发事件,但是当单击顶层上的某些内容时,事件的 originalTarget 属性不是底层中的图像.有没有办法改变这个?

                  The problem i have is that the event gets raised no matter what but the originalTarget property of the event is not the image in the underlying layer when something on the top layer is clicked. Is there anyway to change this?

                  推荐答案

                  叫做事件冒泡,可以通过event.stopPropagation()方法来控制(event.cancelBubble() 在 IE 中).您还可以通过从元素上的 onwhatever 属性调用的处理程序返回 true/false 来控制它.这是一个棘手的问题,所以我建议你做一些研究.

                  It's called event-bubbling, and you can control it with the event.stopPropagation() method (event.cancelBubble() in IE). You can also control it by returning true/false from handlers called by onwhatever attributes on elements. It's a tricky subject so I suggest you do some research.

                  信息:cancelBubble, stopPropagation

                  这篇关于处理 z-index'd 图层上的点击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何覆盖以前设置的 jquery 事件处理程序? 下一篇:数字输入滚动的 HTML5 事件监听器 - 仅限 Chrome

                  相关文章

                  最新文章

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

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

                  1. <tfoot id='YHapS'></tfoot>

                    1. <legend id='YHapS'><style id='YHapS'><dir id='YHapS'><q id='YHapS'></q></dir></style></legend>