document.activeElement, it’s been supported in IE for a long time and the latest versions of FF and chrome support it also. If nothing has focus, it returns the document.body object.
document.activeElement, it’s been supported in IE for a long time and the latest versions of FF and chrome support it also. If nothing has focus, it returns the document.body object.