推荐关注
› Meteor
› JSLint - a JavaScript code quality tool
› jsFiddle
› D3.js
› WebStorm
推荐书目
› JavaScript 权威指南第 5 版
› Closure: The Definitive Guide
he2020

为什么 document.activeElement 返回的不是当前处在聚焦状态的元素?

  •  
  •   he2020 · Sep 11, 2021 · 1789 views
    This topic created in 1900 days ago, the information mentioned may be changed or developed.
    littleTomorrow1
    littleTomorrow1
    Sep 11, 2021❤️1
    1
    改成监听 keyup 事件,打印的就是 button 了,应该是跟焦点转移的时机有关,keydown 的时候,焦点还在 input 上
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4574 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 06:51 · PVG 14:51 · LAX 22:51 · JFK 01:51
    ♥ Do have faith in what you're doing.