开发者

How to get focus node for ie

开发者 https://www.devze.com 2023-02-12 21:35 出处:网络
I have a div, I want to find the current focus node(element) in div for ie. For firefox and chrome i got the focus node using selection attribute. There is no this 开发者_如何学编程kind of attribute f

I have a div, I want to find the current focus node(element) in div for ie. For firefox and chrome i got the focus node using selection attribute. There is no this 开发者_如何学编程kind of attribute for ie.

selection.focusNode

pls give your ideas. Thanks in advance.


try:

document.activeElement

DEMO

0

精彩评论

暂无评论...
验证码 换一张
取 消