HTML5 added to help manage focus product features, there are ways to obtain focus documents; Page load, user input (usually by tab bond). and invoke the Code focus () feature.
HTML5 new properties and methods to assist in the management of the focus:
Document.activeelement property, Element. The document load period value is null and the document is loaded and saved as a reference to document.body.
Document.hasfocus () method to determine whether a document has focus.
The two most important use of querying a file to learn that the element has focus and to determine whether the file has focus is to improve web accessibility applications. Handicapped-only web an important sign of application management is the correct focus, and you know which elements have the focus is a big step forward. We no longer need to rely on speculation like the past.
Be aware of browsers with two attributes ie 4+, Firefox, Safari 4+, Chrome and opera 8+.
Full stack JavaScript road (15) HTML5 Focus expansion (extension point)