Crossbrowser equivalent of explicitOriginalTarget event parameter

后端 未结 6 724
北海茫月
北海茫月 2020-12-02 00:00

Does anyone know of crossbrowser equivalent of explicitOriginalTarget event parameter? This parameter is Mozilla specific and it gives me the element that caused the blur. L

6条回答
  •  时光说笑
    2020-12-02 00:27

    The rough equivalent for Mozilla's .explicitOriginalTarget in IE is document.activeElement. I say rough equivalent because it will sometimes return a slightly different level in the DOM node tree depending on your circumstance, but it's still a useful tool. Unfortunately I'm still looking for a Google Chrome equivalent.

提交回复
热议问题