Javascript焦点管理-document.activeElement
document.activeElement指向页面中当前获得焦点的元素;- 元素获得焦点的方式;
- 文档刚加载完,
document.activeElement指向document.body; - 文档加载期间,
document.activeElement指向null。
mannuan
Rome was not built in a day.
document.activeElement指向页面中当前获得焦点的元素;document.activeElement指向document.body;document.activeElement指向null。