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

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

  •  
  •   he2020 · Sep 11, 2021 · 1771 views
    This topic created in 1893 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   ·   2366 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 13:10 · PVG 21:10 · LAX 05:10 · JFK 08:10
    ♥ Do have faith in what you're doing.