DOM:document.hasFocus
From MDC
Contents |
[edit] Summary
The hasFocus attribute returns true if the focus is currently located anywhere inside the specified document.
Note: This attribute is part of the in-development HTML 5 specification.
[edit] Syntax
focused = document.hasFocus();